From: Xuan-Son Nguyen Date: Sun, 25 May 2025 17:02:18 +0000 (+0200) Subject: webui : bump max upload file size to 500MB (#13779) X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=2f099b510f460374acd52742b494595e3e3442d3;p=pkg%2Fggml%2Fsources%2Fllama.cpp webui : bump max upload file size to 500MB (#13779) --- diff --git a/tools/server/public/index.html.gz b/tools/server/public/index.html.gz index 3f1d3f31..8d4e392f 100644 Binary files a/tools/server/public/index.html.gz and b/tools/server/public/index.html.gz differ diff --git a/tools/server/webui/src/components/useChatExtraContext.tsx b/tools/server/webui/src/components/useChatExtraContext.tsx index 42765524..6f070129 100644 --- a/tools/server/webui/src/components/useChatExtraContext.tsx +++ b/tools/server/webui/src/components/useChatExtraContext.tsx @@ -46,8 +46,11 @@ export function useChatExtraContext(): ChatExtraContextApi { try { for (const file of files) { const mimeType = file.type; - if (file.size > 10 * 1024 * 1024) { - toast.error('File is too large. Maximum size is 10MB.'); + + // this limit is only to prevent accidental uploads of huge files + // it can potentially crashes the browser because we read the file as base64 + if (file.size > 500 * 1024 * 1024) { + toast.error('File is too large. Maximum size is 500MB.'); break; }