mirror of
https://github.com/open-webui/open-webui
synced 2025-04-16 21:42:50 +00:00
fix: audio file upload response issue
This commit is contained in:
parent
65ed76abe1
commit
cbe2056587
@ -122,6 +122,7 @@ def upload_file(
|
||||
]:
|
||||
file_path = Storage.get_file(file_path)
|
||||
result = transcribe(request, file_path)
|
||||
|
||||
process_file(
|
||||
request,
|
||||
ProcessFileForm(file_id=id, content=result.get("text", "")),
|
||||
@ -129,7 +130,8 @@ def upload_file(
|
||||
)
|
||||
elif file.content_type not in ["image/png", "image/jpeg", "image/gif"]:
|
||||
process_file(request, ProcessFileForm(file_id=id), user=user)
|
||||
file_item = Files.get_file_by_id(id=id)
|
||||
|
||||
file_item = Files.get_file_by_id(id=id)
|
||||
except Exception as e:
|
||||
log.exception(e)
|
||||
log.error(f"Error processing file: {file_item.id}")
|
||||
|
@ -958,7 +958,7 @@ def process_file(
|
||||
|
||||
if form_data.content:
|
||||
# Update the content in the file
|
||||
# Usage: /files/{file_id}/data/content/update
|
||||
# Usage: /files/{file_id}/data/content/update, /files/ (audio file upload pipeline)
|
||||
|
||||
try:
|
||||
# /files/{file_id}/data/content/update
|
||||
|
Loading…
Reference in New Issue
Block a user