Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix: file type matching from clipboard (#1748)
Browse filesfix(chat): update file type matching
fix upload image from clipboard when type is `*`
Co-authored-by: Nathan Sarrazin <[email protected]>
src/lib/components/chat/ChatWindow.svelte
CHANGED
@@ -134,7 +134,9 @@
|
|
134 |
return activeMimeTypes.some((mimeType: string) => {
|
135 |
const [type, subtype] = mimeType.split("/");
|
136 |
const [fileType, fileSubtype] = file.type.split("/");
|
137 |
-
return
|
|
|
|
|
138 |
});
|
139 |
});
|
140 |
|
|
|
134 |
return activeMimeTypes.some((mimeType: string) => {
|
135 |
const [type, subtype] = mimeType.split("/");
|
136 |
const [fileType, fileSubtype] = file.type.split("/");
|
137 |
+
return (
|
138 |
+
(type === "*" || fileType === type) && (subtype === "*" || fileSubtype === subtype)
|
139 |
+
);
|
140 |
});
|
141 |
});
|
142 |
|