diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index f8050030a..543b196f5 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -357,7 +357,7 @@ if (inputFiles && inputFiles.length > 0) { inputFiles.forEach((file) => { console.log(file, file.name.split('.').at(-1)); - if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) { + if (['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(file['type'])) { let reader = new FileReader(); reader.onload = (event) => { files = [ @@ -547,7 +547,7 @@ if (inputFiles && inputFiles.length > 0) { const _inputFiles = Array.from(inputFiles); _inputFiles.forEach((file) => { - if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) { + if (['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(file['type'])) { let reader = new FileReader(); reader.onload = (event) => { files = [ diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index 978c1b9b6..4b02f082c 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -127,7 +127,7 @@ if ( files.length > 0 && - ['image/gif', 'image/jpeg', 'image/png'].includes(files[0]['type']) + ['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(files[0]['type']) ) { reader.readAsDataURL(files[0]); } diff --git a/src/routes/(app)/workspace/modelfiles/create/+page.svelte b/src/routes/(app)/workspace/modelfiles/create/+page.svelte index c1356d406..f7fe523a0 100644 --- a/src/routes/(app)/workspace/modelfiles/create/+page.svelte +++ b/src/routes/(app)/workspace/modelfiles/create/+page.svelte @@ -339,7 +339,7 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, ''); if ( inputFiles && inputFiles.length > 0 && - ['image/gif', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type']) + ['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type']) ) { reader.readAsDataURL(inputFiles[0]); } else { diff --git a/src/routes/(app)/workspace/modelfiles/edit/+page.svelte b/src/routes/(app)/workspace/modelfiles/edit/+page.svelte index 272c07736..d2f0a1c10 100644 --- a/src/routes/(app)/workspace/modelfiles/edit/+page.svelte +++ b/src/routes/(app)/workspace/modelfiles/edit/+page.svelte @@ -238,7 +238,7 @@ if ( inputFiles && inputFiles.length > 0 && - ['image/gif', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type']) + ['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type']) ) { reader.readAsDataURL(inputFiles[0]); } else {