mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
enh: always process file with external document loader
This commit is contained in:
parent
797c7d4e56
commit
3f2025dc6e
1 changed files with 5 additions and 8 deletions
|
|
@ -154,14 +154,11 @@ def upload_file(
|
||||||
ProcessFileForm(file_id=id, content=result.get("text", "")),
|
ProcessFileForm(file_id=id, content=result.get("text", "")),
|
||||||
user=user,
|
user=user,
|
||||||
)
|
)
|
||||||
elif file.content_type not in [
|
elif (
|
||||||
"image/png",
|
not file.content_type.startswith(("image/", "video/"))
|
||||||
"image/jpeg",
|
or request.app.state.config.CONTENT_EXTRACTION_ENGINE
|
||||||
"image/gif",
|
== "external"
|
||||||
"video/mp4",
|
):
|
||||||
"video/ogg",
|
|
||||||
"video/quicktime",
|
|
||||||
]:
|
|
||||||
process_file(request, ProcessFileForm(file_id=id), user=user)
|
process_file(request, ProcessFileForm(file_id=id), user=user)
|
||||||
else:
|
else:
|
||||||
log.info(
|
log.info(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue