[PR #8516] [CLOSED] refac: file removal should use delete_file_by_id #61096

Closed
opened 2026-05-06 04:23:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/8516
Author: @juananpe
Created: 1/13/2025
Status: Closed

Base: devHead: refactor-file-removal


📝 Commits (1)

  • 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>
GiteaMirror added the pull-request label 2026-05-06 04:23:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#61096