Skip to content

Commit f9ab66f

Browse files
tjbckHsienz
andcommitted
refac
Co-Authored-By: Hsienz <55347238+hsienz@users.noreply.github.com>
1 parent ce8ed5b commit f9ab66f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

backend/open_webui/routers/files.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ def upload_file_handler(
282282
},
283283
"meta": {
284284
"name": name,
285-
"content_type": file.content_type if isinstance(file.content_type, str) else None,
285+
"content_type": (
286+
file.content_type
287+
if isinstance(file.content_type, str)
288+
else None
289+
),
286290
"size": len(contents),
287291
"data": file_metadata,
288292
},
@@ -577,7 +581,7 @@ class ContentForm(BaseModel):
577581

578582

579583
@router.post("/{id}/data/content/update")
580-
async def update_file_data_content_by_id(
584+
def update_file_data_content_by_id(
581585
request: Request,
582586
id: str,
583587
form_data: ContentForm,

0 commit comments

Comments
 (0)