mirror of
https://github.com/open-webui/open-webui
synced 2025-06-13 18:02:50 +00:00
refac: file upload handling behaviour
This commit is contained in:
parent
b80f0751f6
commit
32ea31144e
@ -125,7 +125,7 @@ def upload_file(
|
||||
)
|
||||
if process:
|
||||
try:
|
||||
|
||||
if file.content_type:
|
||||
if file.content_type.startswith(
|
||||
(
|
||||
"audio/mpeg",
|
||||
@ -155,7 +155,7 @@ def upload_file(
|
||||
process_file(request, ProcessFileForm(file_id=id), user=user)
|
||||
else:
|
||||
log.info(
|
||||
f"File type {file.content_type} is not supported for processing, but trying to process anyway"
|
||||
f"File type {file.content_type} is not provided, but trying to process anyway"
|
||||
)
|
||||
process_file(request, ProcessFileForm(file_id=id), user=user)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user