When adding a variable at the start node, if you select Single File / File List → Other File Types and enter a custom file type, clicking "Save" will trigger an error. You must first confirm the input by pressing Enter before you can successfully save #14855

Closed
opened 2026-02-21 19:19:04 -05:00 by yindo · 1 comment
Owner

Originally created by @a123das on GitHub (Jun 24, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.3

Cloud or Self Hosted

Cloud

Steps to reproduce

1.Enter the start node and click "Add Variable"
2.Under "Other File Types" for the single-file variable, input ".yml" and click "Save"

Image
Image
Image

✔️ Expected Behavior

After entering content, click anywhere outside to save the input.

Actual Behavior

Enter '.yml', click 'Save', but get a 'File type cannot be empty' prompt (in reality, you need to press Enter to save the input).

Originally created by @a123das on GitHub (Jun 24, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1.Enter the start node and click "Add Variable" 2.Under "Other File Types" for the single-file variable, input ".yml" and click "Save" ![Image](https://github.com/user-attachments/assets/8e3d4f62-e405-44f9-a1ee-769a57ac07f9) ![Image](https://github.com/user-attachments/assets/38894a5d-0a74-44a8-8c0e-1524e1ee3773) ![Image](https://github.com/user-attachments/assets/0216fa87-f055-4bb7-b4fe-f0eee74becd3) ### ✔️ Expected Behavior After entering content, click anywhere outside to save the input. ### ❌ Actual Behavior Enter '.yml', click 'Save', but get a 'File type cannot be empty' prompt (in reality, you need to press Enter to save the input).
yindo added the 🐞 bugcloud labels 2026-02-21 19:19:04 -05:00
yindo closed this issue 2026-02-21 19:19:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 24, 2025):

This is a known UX issue with the custom file type input: when you type a new file type (like ".yml") and click Save without pressing Enter, the input isn't registered, so you get the "File type cannot be empty" error. This happens because the component only commits the value to the form state when you explicitly confirm it (usually by pressing Enter). There isn't any documentation or tracked issue for this behavior right now.

As a workaround, make sure to press Enter after typing your custom file type before clicking Save. This will ensure your input is recognized and saved. This pattern is common in tag-based or chip input fields, but it could be improved by automatically committing the input on Save or when the field loses focus. The relevant logic is in the AddVariable component of the codebase, which handles how these values are processed before saving.

If you need more technical details or want to reference the implementation, you can check the AddVariable component's logic here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 24, 2025): <!-- Answer --> This is a known UX issue with the custom file type input: when you type a new file type (like ".yml") and click Save without pressing Enter, the input isn't registered, so you get the "File type cannot be empty" error. This happens because the component only commits the value to the form state when you explicitly confirm it (usually by pressing Enter). There isn't any documentation or tracked issue for this behavior right now. As a workaround, make sure to press Enter after typing your custom file type before clicking Save. This will ensure your input is recognized and saved. This pattern is common in tag-based or chip input fields, but it could be improved by automatically committing the input on Save or when the field loses focus. The relevant logic is in the AddVariable component of the codebase, which handles how these values are processed before saving. If you need more technical details or want to reference the implementation, you can check the AddVariable component's logic [here](https://github.com/langgenius/dify/blob/f668d89621234d5eb960c1c099505cd0c06e9023/web/app/components/workflow/nodes/variable-assigner/components/add-variable/index.tsx). <!-- 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/77692442-e91f-4208-a472-81b6954b943b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/77692442-e91f-4208-a472-81b6954b943b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/77692442-e91f-4208-a472-81b6954b943b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/77692442-e91f-4208-a472-81b6954b943b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/77692442-e91f-4208-a472-81b6954b943b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/77692442-e91f-4208-a472-81b6954b943b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/77692442-e91f-4208-a472-81b6954b943b?feedback_type=other)</sup>&nbsp;&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/21449)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14855