Pārlūkot izejas kodu

enh: avif support

Timothy Jaeryang Baek 2 mēneši atpakaļ
vecāks
revīzija
9bd26d6faa

+ 3 - 1
src/lib/components/channel/MessageInput.svelte

@@ -103,7 +103,9 @@
 				return;
 			}
 
-			if (['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(file['type'])) {
+			if (
+				['image/gif', 'image/webp', 'image/jpeg', 'image/png', 'image/avif'].includes(file['type'])
+			) {
 				let reader = new FileReader();
 
 				reader.onload = async (event) => {

+ 3 - 1
src/lib/components/chat/MessageInput.svelte

@@ -249,7 +249,9 @@
 				return;
 			}
 
-			if (['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(file['type'])) {
+			if (
+				['image/gif', 'image/webp', 'image/jpeg', 'image/png', 'image/avif'].includes(file['type'])
+			) {
 				if (visionCapableModels.length === 0) {
 					toast.error($i18n.t('Selected model(s) do not support image inputs'));
 					return;