mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
feat: Enable Passing Uploaded Files Directly to Models #5763
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 @lajdzsi on GitHub (Jul 15, 2025).
Check Existing Issues
Problem Description
When uploading a file to a chat, even when the "Bypass Embedding and Retrieval" option is turned on, the file's content is extracted and only the extracted text is passed to the model fully.
There are cases when it's beneficial to pass the files directly to the LLMs, and it is a standard feature in many similar solutions.
Desired Solution you'd like
I’d like to suggest adding an option to pass uploaded files directly to the models, bypassing automatic text extraction.
This could be e.g. a switch next to the file upload UI element.
The binary content of the files is already stored in the database, and can be accessed via the body dictionary, so the data is there.
Alternatives Considered
No response
Additional Context
Passing raw files would enable more flexible and powerful interactions, as well as the support of many different file formats. Currently, OpenWebUI only supports the passing of extracted text from uploads, which limits working with binary files, images, or structured data.
Implementing this feature would give users greater control and unlock new use cases.
Thanks for considering this enhancement!
@rgaricano commented on GitHub (Jul 15, 2025):
The way to pass raw files is to base64-encode them and send them as a response, which will result in a substantial increase in tokens and context length; this is not a viable solution.
Another option is to simply pass the upload URL to the model or share the document with the model via another URL that is accessible to it.
@GmodCentral commented on GitHub (Jul 15, 2025):
Passing the URL makes most sense. I would really love this feature. Tools like python docx could make good use of this. Currently my solution is a bit convoluted as it involves pulling the latest filename from the API, then copying the file for editing into the /tmp dir. You can see how this works here.
https://gitlab.com/gmod-central/owui-word-doc-template-editor
It would make things a lot easier if the URL could be just fed directly into context when uploading a file. Like the file name and path.