[GH-ISSUE #17492] issue: File Upload Ignored When Message Text Is Empty in OpenWebUI Custom Prompt #18306

Closed
opened 2026-04-20 00:31:10 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @tblanks1973 on GitHub (Sep 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17492

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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
Image

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:

  1. Ask the user a question not involving a file upload, e.g., "What is the name of your report?"
  2. After receiving the answer, prompt the user: "Please upload the files"
  3. Once files are uploaded, write a paragraph for each file which summarizes the contents of the file. Out the name of the file in bold and the description in normal text

Logs & Screenshots

Below shows the same upload with text 'Here are the files' in the message prompt
Image

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.

Originally created by @tblanks1973 on GitHub (Sep 17, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17492 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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 <img width="511" height="209" alt="Image" src="https://github.com/user-attachments/assets/88bc3a9f-ee22-4869-ad42-2cdc35cc065b" /> ### 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: 1. Ask the user a question not involving a file upload, e.g., "What is the name of your report?" 2. After receiving the answer, prompt the user: "Please upload the files" 3. Once files are uploaded, write a paragraph for each file which summarizes the contents of the file. Out the name of the file in bold and the description in normal text ### Logs & Screenshots Below shows the same upload with text '**Here are the files**' in the message prompt <img width="511" height="209" alt="Image" src="https://github.com/user-attachments/assets/9968312c-3908-40b0-a828-67341dd61080" /> ### 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.
GiteaMirror added the bug label 2026-04-20 00:31:10 -05:00
Author
Owner

@tusharrrr1 commented on GitHub (Sep 18, 2025):

Hey, I would like to work on this issue, would happily push a PR to it.

<!-- gh-comment-id:3309368363 --> @tusharrrr1 commented on GitHub (Sep 18, 2025): Hey, I would like to work on this issue, would happily push a PR to it.
Author
Owner

@tjbck commented on GitHub (Sep 24, 2025):

Addressed.

<!-- gh-comment-id:3329780718 --> @tjbck commented on GitHub (Sep 24, 2025): Addressed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#18306