[GH-ISSUE #14713] feat: "Upload" files to knowledge by API / Container / Volumes (local files) #56007

Closed
opened 2026-05-05 18:29:29 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @lowcraft on GitHub (Jun 5, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14713

Check Existing Issues

  • I have searched the existing issues and discussions.

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

Originally created by @lowcraft on GitHub (Jun 5, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14713 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### 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_
Author
Owner

@tjbck commented on GitHub (Jun 5, 2025):

https://github.com/open-webui/cookbook

<!-- gh-comment-id:2946550856 --> @tjbck commented on GitHub (Jun 5, 2025): https://github.com/open-webui/cookbook
Author
Owner

@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!

<!-- gh-comment-id:2946615924 --> @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!_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56007