Skip to content

Commit 423902c

Browse files
committed
fix(tools): dropzone properly support */* mimetype
1 parent 09b7038 commit 423902c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/components/chat/FileDropzone.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
!mimeTypes.some((mimeType: string) => {
2727
const [type, subtype] = mimeType.split("/");
2828
const [fileType, fileSubtype] = file.type.split("/");
29-
return type === fileType && (subtype === "*" || fileSubtype === subtype);
29+
return (
30+
(type === "*" || type === fileType) &&
31+
(subtype === "*" || subtype === fileSubtype)
32+
);
3033
})
3134
) {
3235
setErrorMsg(`Some file type not supported. Only allowed: ${mimeTypes.join(", ")}`);

0 commit comments

Comments
 (0)