From 3f2025dc6e0efabf1b3c382599a5790a24b81d1d Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 23 May 2025 21:55:09 +0400 Subject: [PATCH] enh: always process file with external document loader --- backend/open_webui/routers/files.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/backend/open_webui/routers/files.py b/backend/open_webui/routers/files.py index 1acecad08..ab3b35cc6 100644 --- a/backend/open_webui/routers/files.py +++ b/backend/open_webui/routers/files.py @@ -154,14 +154,11 @@ def upload_file( ProcessFileForm(file_id=id, content=result.get("text", "")), user=user, ) - elif file.content_type not in [ - "image/png", - "image/jpeg", - "image/gif", - "video/mp4", - "video/ogg", - "video/quicktime", - ]: + elif ( + not file.content_type.startswith(("image/", "video/")) + or request.app.state.config.CONTENT_EXTRACTION_ENGINE + == "external" + ): process_file(request, ProcessFileForm(file_id=id), user=user) else: log.info(