mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
Merge pull request #17229 from ShirasawaSama/feat/dynamic-load-heic2any
feat: dynamically load heic2any in channel MessageInput
This commit is contained in:
commit
fe0665605a
1 changed files with 2 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import heic2any from 'heic2any';
|
||||
|
||||
import { tick, getContext, onMount, onDestroy } from 'svelte';
|
||||
|
||||
|
|
@ -9,7 +8,7 @@
|
|||
|
||||
import { config, mobile, settings, socket, user } from '$lib/stores';
|
||||
import {
|
||||
blobToFile,
|
||||
convertHeicToJpeg,
|
||||
compressImage,
|
||||
extractInputVariables,
|
||||
getAge,
|
||||
|
|
@ -379,7 +378,7 @@
|
|||
|
||||
reader.readAsDataURL(
|
||||
file['type'] === 'image/heic'
|
||||
? await heic2any({ blob: file, toType: 'image/jpeg' })
|
||||
? await convertHeicToJpeg(file)
|
||||
: file
|
||||
);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue