mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #14080] issue: Uploaded files via API can't be accessed in Knowledge Base, but UI uploads work #55798
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?
Originally created by @jalamax13 on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14080
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.10
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04.2
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Summary: When uploading files to a knowledge base via the API, the operation completes successfully (200 OK), but the knowledge becomes inaccessible in the user interface from version v0.6.6.
In Open WebUI v0.6.5, the same Python script and API workflow worked perfectly - downloaded files were accessible and the knowledge base could be opened and queried via the interface.
Since v0.6.6 and higher (tested in v0.6.10), the knowledge base becomes broken/inaccessible in the user interface after a file has been uploaded via the API.
Sample Python Script Used:
Actual Behavior
Hello,
When uploading a file to a knowledge base using the API, the system returns 200 OK and reports the knowledge base as updated. However, trying to access it via the UI causes a frontend crash.
Steps to reproduce:
Upload a file via /api/v1/files/ (even a minimal .txt file).
Associate it with the knowledge base using /api/v1/knowledge/{id}/file/add.
Go to the knowledge base in the UI.
Result:
The knowledge becomes inaccessible in the WebUI.
In the browser console, I get this error:
FileItemModal.svelte:28 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'startsWith')
at r.$$.update (FileItemModal.svelte:28:28)
at Pt (Component.js:144:5)
at new nt (FileItemModal.svelte:33:59)
at ze (FileItem.svelte:42:37)
at mt (FileItem.svelte:41:10)
at Pt (Component.js:148:34)
at new Vt (FileItem.svelte:63:19)
at gt (ArrowUpCircle.svelte:3:27)
at fl (Files.svelte:14:8)
at Pt (Component.js:148:34)
Uploading the same file via the UI interface (without API) works fine.
Tested on Open WebUI version 0.6.10.
Steps to Reproduce
.
Logs & Screenshots
FileItemModal.svelte:28 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'startsWith')
at r.$$.update (FileItemModal.svelte:28:28)
at Pt (Component.js:144:5)
at new nt (FileItemModal.svelte:33:59)
at ze (FileItem.svelte:42:37)
at mt (FileItem.svelte:41:10)
at Pt (Component.js:148:34)
at new Vt (FileItem.svelte:63:19)
at gt (ArrowUpCircle.svelte:3:27)
at fl (Files.svelte:14:8)
at Pt (Component.js:148:34)
Additional Information
No response
@tjbck commented on GitHub (May 20, 2025):
Should be addressed with
a8a9b35153