mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 06:02:06 -05:00
[PR #8547] [MERGED] fix: File deletion doesn't properly clean up database entries #9038
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/8547
Author: @juananpe
Created: 1/14/2025
Status: ✅ Merged
Merged: 1/15/2025
Merged by: @tjbck
Base:
dev← Head:file-deletion📝 Commits (1)
f477f4ffix: fixess issue [PR #578] [MERGED] add missing OLLAMA_WEBUI_PORT override (#7181)📊 Changes
5 files changed (+34 additions, -15 deletions)
View changed files
📝
backend/open_webui/routers/files.py(+2 -0)📝
src/lib/components/chat/MessageInput.svelte(+14 -3)📝
src/lib/components/common/FileItem.svelte(+2 -0)📝
src/lib/components/workspace/Knowledge/KnowledgeBase.svelte(+15 -11)📝
src/lib/components/workspace/Knowledge/KnowledgeBase/Files.svelte(+1 -1)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Fix file deletion to properly clean up resources
Description
When deleting files from either knowledge bases or chat, the system wasn't properly cleaning up all associated resources, particularly in the sqlite DB. This caused issues with re-uploading previously deleted files and left orphaned entries in the database and the uploads/ folder.
Known issues
delete_file_by_idfunction:So I added a comment there ( # We should add Chroma cleanup here) as a placeholder to remember that we should act here.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.