From ac321f4b6485726a864b7a345ad96ec0a88ed5bd Mon Sep 17 00:00:00 2001 From: Rodrigo Agundez Date: Tue, 11 Mar 2025 12:50:44 +0800 Subject: [PATCH] Add check if images and avoid trying to calculate embeddings --- backend/open_webui/routers/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/routers/files.py b/backend/open_webui/routers/files.py index 95b7f6461..6aada71a2 100644 --- a/backend/open_webui/routers/files.py +++ b/backend/open_webui/routers/files.py @@ -81,7 +81,7 @@ def upload_file( ProcessFileForm(file_id=id, content=result.get("text", "")), user=user, ) - else: + elif file.content_type not in ["image/png", "image/jpeg", "image/gif"]: process_file(request, ProcessFileForm(file_id=id), user=user) file_item = Files.get_file_by_id(id=id)