46991f3 refac: file removal should use delete_file_by_id function for consistency
📊 Changes
1 file changed (+4 additions, -8 deletions)
View changed files
📝backend/open_webui/routers/knowledge.py (+4 -8)
📄 Description
Pull Request Checklist
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of [Keep a Changelog]
Prefix: To cleary categorize this pull request, prefix the pull request title
Changelog Entry
file removal should use delete_file_by_id function for consistency
Description
This PR refactors the file removal mechanism in the knowledge router to improve consistency and maintainability.
Changes
The remove_file_from_knowledge_by_id function is now asynchronous.
The physical file deletion and database removal are now handled by the delete_file_by_id function from the open_webui.routers.files module.
The Storage class is no longer used directly for file deletion, reducing direct dependencies on the storage provider.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/8516
**Author:** [@juananpe](https://github.com/juananpe)
**Created:** 1/13/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `refactor-file-removal`
---
### 📝 Commits (1)
- [`46991f3`](https://github.com/open-webui/open-webui/commit/46991f373cbd84f5a3f7195df5149d0f0d5ef9b6) refac: file removal should use delete_file_by_id function for consistency
### 📊 Changes
**1 file changed** (+4 additions, -8 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/knowledge.py` (+4 -8)
</details>
### 📄 Description
# Pull Request Checklist
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog]
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title
# Changelog Entry
file removal should use delete_file_by_id function for consistency
### Description
This PR refactors the file removal mechanism in the knowledge router to improve consistency and maintainability.
### Changes
* The `remove_file_from_knowledge_by_id` function is now asynchronous.
* The physical file deletion and database removal are now handled by the `delete_file_by_id` function from the `open_webui.routers.files` module.
* The `Storage` class is no longer used directly for file deletion, reducing direct dependencies on the storage provider.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/8516
Author: @juananpe
Created: 1/13/2025
Status: ❌ Closed
Base:
dev← Head:refactor-file-removal📝 Commits (1)
46991f3refac: file removal should use delete_file_by_id function for consistency📊 Changes
1 file changed (+4 additions, -8 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+4 -8)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
file removal should use delete_file_by_id function for consistency
Description
This PR refactors the file removal mechanism in the knowledge router to improve consistency and maintainability.
Changes
remove_file_from_knowledge_by_idfunction is now asynchronous.delete_file_by_idfunction from theopen_webui.routers.filesmodule.Storageclass is no longer used directly for file deletion, reducing direct dependencies on the storage provider.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.