feat: block upload file replace other system file

This commit is contained in:
Methapon2001 2024-01-12 13:53:15 +07:00
parent fb70e5174a
commit b100da112d
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
4 changed files with 12 additions and 19 deletions

View file

@ -10,7 +10,7 @@ const props = withDefaults(
defineProps<{
open: boolean
error: {
fileExistMetadata?: boolean
externalFileExist?: boolean
fileExist?: boolean
fileName2Long?: boolean
}
@ -189,12 +189,12 @@ const file = ref<File | undefined>()
: 'เลือกไฟล์'
"
:error="
!!error.fileExistMetadata ||
!!error.externalFileExist ||
!!error.fileExist ||
!!error.fileName2Long
"
:error-message="
error.fileExistMetadata
error.externalFileExist
? 'พบไฟล์ชื่อซ้ำในระบบอื่น'
: error.fileExist
? 'พบไฟล์ชื่อซ้ำในระบบ ไฟล์ชื่อนี้ภายในระบบจะถูกเขียนทับ'