Root cause: Knowledge upload pipeline did linking AFTER processing. If user navigated away during the slow embedding step, files were orphaned in the vector DB with no relational record.
Fix: Reversed order — link FIRST (fast), process SECOND (slow). Rollback link on processing failure. Applies to both single-file and batch endpoints.
🔄 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/24889
**Author:** [@paulxg12](https://github.com/paulxg12)
**Created:** 5/18/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `main`
---
### 📝 Commits (1)
- [`312693a`](https://github.com/open-webui/open-webui/commit/312693acbd7c30ebb599c5ed4a080afb9e76a895) fix: prevent orphaned knowledge files by ensuring atomic upload-process-link chain (#24807)
### 📊 Changes
**1 file changed** (+37 additions, -13 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/knowledge.py` (+37 -13)
</details>
### 📄 Description
Closes #24807
**Root cause**: Knowledge upload pipeline did linking AFTER processing. If user navigated away during the slow embedding step, files were orphaned in the vector DB with no relational record.
**Fix**: Reversed order — link FIRST (fast), process SECOND (slow). Rollback link on processing failure. Applies to both single-file and batch endpoints.
---
<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/24889
Author: @paulxg12
Created: 5/18/2026
Status: ❌ Closed
Base:
main← Head:main📝 Commits (1)
312693afix: prevent orphaned knowledge files by ensuring atomic upload-process-link chain (#24807)📊 Changes
1 file changed (+37 additions, -13 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+37 -13)📄 Description
Closes #24807
Root cause: Knowledge upload pipeline did linking AFTER processing. If user navigated away during the slow embedding step, files were orphaned in the vector DB with no relational record.
Fix: Reversed order — link FIRST (fast), process SECOND (slow). Rollback link on processing failure. Applies to both single-file and batch endpoints.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.