- backup files.py
- modify files.py
sudo docker cp open-webui:/app/backend/open_webui/routers/files.py files.py
sudo nano files.py
find all
if file and (file.user_id == user.id or user.role == "admin"):
and add front remark like this
#if file and (file.user_id == user.id or user.role == "admin"):
and add code under this line
if file:
- replace files.py
sudo docker cp files.py open-webui:/app/backend/open_webui/routers/files.py