mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
Merge branch 'open-webui:main' into main
This commit is contained in:
commit
b185524a8c
@ -223,7 +223,10 @@ async def get_file_content_by_id(id: str, user=Depends(get_verified_user)):
|
|||||||
# Check if the file already exists in the cache
|
# Check if the file already exists in the cache
|
||||||
if file_path.is_file():
|
if file_path.is_file():
|
||||||
print(f"file_path: {file_path}")
|
print(f"file_path: {file_path}")
|
||||||
return FileResponse(file_path)
|
headers = {
|
||||||
|
"Content-Disposition": f'attachment; filename="{file.meta.get("name", file.filename)}"'
|
||||||
|
}
|
||||||
|
return FileResponse(file_path, headers=headers)
|
||||||
else:
|
else:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_404_NOT_FOUND,
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
|
@ -186,7 +186,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="text-base font-normal xl:translate-x-6 lg:max-w-3xl w-full py-3 {atSelectedModel
|
class="text-base font-normal xl:translate-x-6 md:max-w-3xl w-full py-3 {atSelectedModel
|
||||||
? 'mt-2'
|
? 'mt-2'
|
||||||
: ''}"
|
: ''}"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user