Browse Source

Merge pull request #13246 from jmtatsch/fix-video-treated-as-text

Fix uploading video files
Tim Jaeryang Baek 5 months ago
parent
commit
c3da9f3026
1 changed files with 9 additions and 1 deletions
  1. 9 1
      backend/open_webui/routers/files.py

+ 9 - 1
backend/open_webui/routers/files.py

@@ -137,7 +137,15 @@ 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"]:
+                elif file.content_type not in [
+                    "image/png",
+                    "image/jpeg",
+                    "image/gif",
+                    "video/mp4",
+                    "video/ogg",
+                    "video/quicktime",
+                    "video/webm",
+                ]:
                     process_file(request, ProcessFileForm(file_id=id), user=user)
 
                 file_item = Files.get_file_by_id(id=id)