mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[GH-ISSUE #17492] issue: File Upload Ignored When Message Text Is Empty in OpenWebUI Custom Prompt #18306
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 @tblanks1973 on GitHub (Sep 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17492
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.28
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
In OpenWebUI, when a custom prompt includes a file-upload step that follows an initial text-only step, uploaded files are not recognised if the user submits the upload with no accompanying message text (length = 0).
The AI responds as if no files were uploaded.
This occurs specifically when the file-upload step is not the initial step within a prompt.
Possible cause (speculative): message handling discards attachments when the text field is empty.
Actual Behavior
Below shows the upload without any text in the message prompt

Steps to Reproduce
A basic reproduction of this issue can be done by creating a model with a custom prompt has these steps:
Do the following steps:
Logs & Screenshots
Below shows the same upload with text 'Here are the files' in the message prompt

Additional Information
The file upload mechanism appears to require that the message contain some text to correctly register file uploads.
Uploading files alone ie: with length(message text) == 0 ) seems to cause an issue, but adding any text allows the files to be recognised.
@tusharrrr1 commented on GitHub (Sep 18, 2025):
Hey, I would like to work on this issue, would happily push a PR to it.
@tjbck commented on GitHub (Sep 24, 2025):
Addressed.