dify - 💡(How to fix) Fix Multiple extensions in the input field type will result in rejection if it's an API. [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35669Fetched 2026-04-30 06:45:51
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
1
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

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.13.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Add an input field to the chat flow.

The input field to be added is a "Single File".

Set the file type to "Other File Types" and the extension to ".json" and ".txt".

When called from a browser, attaching files works regardless of whether the extension is .json or .txt.

When called from the API, files with the extension .txt will not work in stream mode.

Changing the file type to "Document" will allow it to work correctly from the API (but it will not support the .json extension).

<img width="613" height="1079" alt="Image" src="https://github.com/user-attachments/assets/496a2bc4-0acf-43d0-aca0-0c4b06a47422" />

✔️ Expected Behavior

It also works with files that have the .txt extension.

❌ Actual Behavior

When calling the API in stream mode, after the initial ping, there is no response until the connection times out.

extent analysis

TL;DR

The issue can be potentially resolved by adjusting the file type configuration for the input field in the chat flow to support ".txt" extensions in stream mode.

Guidance

  • Verify that the file type configuration is correctly set to "Other File Types" with ".json" and ".txt" extensions when calling the API in stream mode.
  • Check if changing the file type to "Document" allows the API to work correctly with ".txt" files, but note that this may not support ".json" extensions.
  • Investigate the difference in behavior between browser and API calls to identify potential inconsistencies in file handling.
  • Test the API call with different file types and extensions to isolate the issue and confirm the expected behavior.

Example

No code snippet is provided as the issue does not contain explicit code references.

Notes

The issue seems to be related to the specific configuration of the input field and file types, and the behavior difference between browser and API calls. Further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by adjusting the file type configuration to "Document" if it allows the API to work correctly with ".txt" files, but be aware that this may not support ".json" extensions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - 💡(How to fix) Fix Multiple extensions in the input field type will result in rejection if it's an API. [1 comments, 2 participants]