mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
feat: Add file upload functionality to prompts #6892
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 @Azzeo on GitHub (Nov 11, 2025).
Check Existing Issues
Verify Feature Scope
Problem Description
Right now, when creating a Prompt in Workspace → Prompts, I can define text-based variables using the {{}} syntax (including typed inputs like {{description | textarea:required}}). That works great for collecting structured text from the user.
However, there is currently no way to ask the user to upload a file as part of using a prompt. This becomes a limitation for common workflows where the model should process or reference user-provided documents, images, or other files (PDFs, Word documents).
Today, users have to:
upload/attach a file or files in the chat. This breaks some prompts or make them less usable as some file context needs to be inserted in between i.e., instructions.
This breaks the otherwise very nice “fill in the form → run prompt” flow that the current prompt variable system provides.
Desired Solution you'd like
Add first-class support for file inputs in prompt templates so that, when a prompt contains a file variable, the user sees an upload button in the “Input Variables” dialog when invoking that prompt.
Concretely:
Extend the existing prompt variable system ({{variable}} / {{variable | type:...}}) with a file input type (or equivalent).
When a prompt with a file variable is triggered (e.g. via slash command), the dialog should render one or more upload controls corresponding to those variables.
The uploaded file(s) should be passed through to the final prompt / message payload the same way other variable values are, so the model (or connected tooling) can use them.
Ideally support:
single file: {{source_file A | file:required}}
multiple files: {{attachments| file:multiple=true}} (or similar property)
optional files (no :required)
While keeping in mind: RAG or bypass RAG and OCR support (basically use existing file upload functionalities)
Alternatives Considered
Some kind of difficult to implement flow with Tools, Action buttons and/or MCP servers, which can only handle the files input as an array (as far as I know, without distinguishing between specific files as set by the user).
Additional Context
Example of such a prompt: