diff --git a/front/components/FileUpload.vue b/front/components/FileUpload.vue index e779f32..0b296e9 100644 --- a/front/components/FileUpload.vue +++ b/front/components/FileUpload.vue @@ -6,7 +6,7 @@ const props = defineProps<{ accept?: string[] }>() -const accept = computed(() => (props?.accept || ['image/*', 'video/*'])?.join(',')) +const accept = computed(() => (props?.accept || ['*'])?.join(',')) const emit = defineEmits<{ (e: 'onChange', file: File): void @@ -24,6 +24,9 @@ const { isOverDropZone } = useDropZone(dropZoneRef, { for (const acceptType of accept.value.split(',')) { if (acceptType?.endsWith('*')) { const [acceptTypePrefix,] = acceptType?.split('/') + if (!acceptTypePrefix) { + return true + } if (type?.startsWith(acceptTypePrefix)) { return true }