feat: remove file type validation from file upload component

This commit is contained in:
riefive
2025-12-03 09:41:41 +07:00
parent f95d8f3009
commit f0d3de26be
@@ -65,18 +65,6 @@ async function onFileChange(event: Event, handleChange: (value: any) => void) {
return
}
// Validate file type if accept is specified
if (props.accept) {
const acceptedTypes = Array.isArray(props.accept) ? props.accept.map((ext) => `image/${ext}`) : [props.accept]
if (!acceptedTypes.includes(file.type)) {
console.warn(`File type not allowed: ${file.type}`)
handleChange(null)
emit('update:modelValue', null)
emit('fileSelected', null)
return
}
}
handleChange(file)
emit('update:modelValue', file)
emit('fileSelected', file)