From 6636207e0cd63dbb566201a505ac078817f9e452 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 23 May 2025 22:10:57 +0400 Subject: [PATCH] refac --- backend/open_webui/routers/files.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/routers/files.py b/backend/open_webui/routers/files.py index ab3b35cc6..098fcc4d6 100644 --- a/backend/open_webui/routers/files.py +++ b/backend/open_webui/routers/files.py @@ -154,10 +154,8 @@ def upload_file( ProcessFileForm(file_id=id, content=result.get("text", "")), user=user, ) - elif ( - not file.content_type.startswith(("image/", "video/")) - or request.app.state.config.CONTENT_EXTRACTION_ENGINE - == "external" + 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: