mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #14713] feat: "Upload" files to knowledge by API / Container / Volumes (local files) #56007
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 @lowcraft on GitHub (Jun 5, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14713
Check Existing Issues
Problem Description
Hello,
First day using Open WebUI – loving it so far!
I'm running on Windows 11, with both Ollama and Open WebUI running in separate Docker containers.
Open WebUI uses two volumes:
One for internal data
One that mounts a local directory from my host system (D:\mydata) into the container as /data/mydata/.
This mounted directory contains a collection of Markdown files, organized in folders and subfolders.
I'm trying to find a way to import these files into a specific knowledge base — ideally through the API, or via any other supported method (like a function or Python script).
I tried using the /api/v1/knowledge/{id}/file/add endpoint, passing data such as:
{ "path": "/data/mydata" }
But it seems this method might not be supported, or I may be using it incorrectly.
Any guidance on how to achieve this would be greatly appreciated!
Desired Solution you'd like
Automatically update knowledge base with new Markdown files (real-time or scheduled)
Is there any way to automatically update a knowledge base when new Markdown files are added to a specific folder?
Ideally, I’d like to:
Monitor a local folder (mounted into the container)
And automatically add any new or updated Markdown files to a specific knowledge base
This could be in near real-time or at regular intervals.
Is this possible through the API, a built-in feature, a Python script, or any other recommended method?
Thanks in advance!
Alternatives Considered
No response
Additional Context
No response
@tjbck commented on GitHub (Jun 5, 2025):
https://github.com/open-webui/cookbook
@lowcraft commented on GitHub (Jun 5, 2025):
Thank you! I'll be testing this cookbook soon.
EDIT: It works! The automatic file upload to the knowledge base is working. There are still some configurations to do to make it perfect, but a big thanks to you again!