mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
refac: file upload
This commit is contained in:
@@ -61,7 +61,18 @@ def upload_file(
|
||||
f.close()
|
||||
|
||||
file = Files.insert_new_file(
|
||||
user.id, FileForm(**{"id": id, "filename": filename})
|
||||
user.id,
|
||||
FileForm(
|
||||
**{
|
||||
"id": id,
|
||||
"filename": filename,
|
||||
"meta": {
|
||||
"content_type": file.content_type,
|
||||
"size": len(contents),
|
||||
"path": file_path,
|
||||
},
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
if file:
|
||||
|
||||
Reference in New Issue
Block a user