mirror of
https://github.com/open-webui/open-webui
synced 2024-12-23 20:32:44 +00:00
fix
This commit is contained in:
parent
4d46bfe03b
commit
30eb43f5b8
@ -218,7 +218,7 @@ async def get_file_content_by_id(id: str, user=Depends(get_verified_user)):
|
|||||||
file = Files.get_file_by_id(id)
|
file = Files.get_file_by_id(id)
|
||||||
|
|
||||||
if file and (file.user_id == user.id or user.role == "admin"):
|
if file and (file.user_id == user.id or user.role == "admin"):
|
||||||
file_path = Path(file.meta["path"])
|
file_path = Path(file.path)
|
||||||
|
|
||||||
# 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():
|
||||||
|
Loading…
Reference in New Issue
Block a user