For non - mandatory input parameters, a prompt is displayed during execution indicating that the corresponding file type needs to be uploaded. #21089

Closed
opened 2026-02-21 20:10:38 -05:00 by yindo · 1 comment
Owner

Originally created by @jackleehui on GitHub (Dec 16, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

For non - mandatory input parameters, a prompt is displayed during execution indicating that the corresponding file type needs to be uploaded.

Image

✔️ Expected Behavior

Non - mandatory items should not trigger errors.

Actual Behavior

No response

Originally created by @jackleehui on GitHub (Dec 16, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce For non - mandatory input parameters, a prompt is displayed during execution indicating that the corresponding file type needs to be uploaded. <img width="800" height="1253" alt="Image" src="https://github.com/user-attachments/assets/9f4b2813-26cd-4deb-b8d0-0bd5e9e43982" /> ### ✔️ Expected Behavior Non - mandatory items should not trigger errors. ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 20:10:38 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 16, 2025):

This bug is already known and tracked: in Dify v1.10.1, optional file inputs (like image or file upload fields that are not marked as required) incorrectly trigger a validation error if left empty, with messages like “image in input form must be a file.” The root cause is that the frontend sends an empty string or empty list for these fields, which the backend treats as invalid instead of simply ignoring them for optional parameters.

This issue is fixed in versions after 1.10.1. The backend now treats empty values for optional file and file-list inputs as unset, so workflows run without requiring a file unless the field is marked as required. Required file fields still enforce the “is required” error if no file is uploaded. You can see the details and code changes in the merged pull request here.

To resolve this, upgrade to a newer version. If you can’t upgrade right now, a workaround is to manually clear the default value for optional file/file-list variables in your workflow configuration—this avoids the validation error until you update.

Let me know if you need more details about the backend validation logic or how to apply the workaround.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 16, 2025): <!-- Answer --> This bug is already known and tracked: in Dify v1.10.1, optional file inputs (like image or file upload fields that are not marked as required) incorrectly trigger a validation error if left empty, with messages like “image in input form must be a file.” The root cause is that the frontend sends an empty string or empty list for these fields, which the backend treats as invalid instead of simply ignoring them for optional parameters. This issue is fixed in versions after 1.10.1. The backend now treats empty values for optional file and file-list inputs as unset, so workflows run without requiring a file unless the field is marked as required. Required file fields still enforce the “is required” error if no file is uploaded. You can see the details and code changes in the merged pull request [here](https://github.com/langgenius/dify/pull/28948). To resolve this, upgrade to a newer version. If you can’t upgrade right now, a workaround is to manually clear the default value for optional file/file-list variables in your workflow configuration—this avoids the validation error until you update. Let me know if you need more details about the backend validation logic or how to apply the workaround. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b3f6ae99-1666-4237-ad44-5d0a1f4a02de?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20bug%20is%20already%20known%20and%20tracked%3A%20in%20Dify%20v1.10.1%2C%20optional%20file%20inputs%20%28like%20image%20or%20file%20upload%20fields%20that%20are%20not%20marked%20as%20required%29%20incorrectly%20trigger%20a%20validation%20error%20if%20left%20empty%2C%20with%20messages%20like%20%E2%80%9Cimage%20in%20input%20form%20must%20be%20a%20file.%E2%80%9D%20The%20root%20cause%20is%20that%20the%20frontend%20sends%20an%20empty%20string%20or%20empty%20list%20for%20these%20fields%2C%20which%20the%20backend%20treats%20as%20invalid%20instead%20of%20simply%20ignoring%20them%20for%20optional%20parameters.%0A%0AThis%20issue%20is%20fixed%20in%20versions%20after%201.10.1.%20The%20backend%20now%20treats%20empty%20values%20for%20optional%20file%20and%20file-list%20inputs%20as%20unset%2C%20so%20workflows%20run%20without%20requiring%20a%20file%20unless%20the%20field%20is%20marked%20as%20required.%20Required%20file%20fields%20still%20enforce%20the%20%E2%80%9Cis%20required%E2%80%9D%20error%20if%20no%20file%20is%20uploaded.%20You%20can%20see%20the%20details%20and%20code%20changes%20in%20the%20merged%20pull%20request%20%5Bhere%5D%28https%3A//github.com/langgenius/dify/pull/28948%29.%0A%0ATo%20resolve%20this%2C%20upgrade%20to%20a%20newer%20version.%20If%20you%20can%E2%80%99t%20upgrade%20right%20now%2C%20a%20workaround%20is%20to%20manually%20clear%20the%20default%20value%20for%20optional%20file/file-list%20variables%20in%20your%20workflow%20configuration%E2%80%94this%20avoids%20the%20validation%20error%20until%20you%20update.%0A%0ALet%20me%20know%20if%20you%20need%20more%20details%20about%20the%20backend%20validation%20logic%20or%20how%20to%20apply%20the%20workaround.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29744)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21089