langgenius / langgenius/dify

[Bug] Agent file upload: custom file types conflict with document/image types in v1.17

Open
#41,565 1 comment 1 reaction 0 assignees View on GitHub
🐞 bug 1.17.0
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### 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.17.0

### Cloud or Self Hosted

Self Hosted (Docker)

### Steps to reproduce

In the Dify console, open an Agent app (new Agent page in v1.17).

Open the Chat features panel → enable File upload → click Settings to open the File upload settings dialog. Set Upload file types to Both (local + URL).

Under Supported file types:

Try to check Document (or Image) together with Other file types → this is not allowed: checking one unchecks the other, so they cannot be enabled at the same time.

Check only Other file types and enter extensions that overlap with the built-in category lists: JPG, JPEG, PNG, GIF, WEBP, SVG, .pdf, .json, .wps, .ofd → click Save.

Open the app's published web chat page and click the attachment (file upload) button.

Check the file-type filter of the OS file picker dialog.

Image

Image

(Screenshots: ① settings dialog with "Other file types" checked and the overlapping extensions entered; ② web chat file picker showing the filtered type list)

### ✔️ Expected Behavior

Other file types can be enabled at the same time as Document and/or Image.

The web app file picker should accept every explicitly configured extension, i.e. the filter should contain *.jpg;*.jpeg;*.png;*.gif;*.webp;*.svg;*.pdf;*.json;*.wps;*.ofd.

### ❌ Actual Behavior

Other file types is mutually exclusive with Document / Image — the checkboxes cannot be checked together.

With only Other file types checked, the web chat file picker only offers Custom files (*pdf;*json;*wps;*ofd). The extensions JPG, JPEG, PNG, GIF, WEBP, SVG (which belong to the built-in Image list) are silently removed from the filter, so end users cannot upload those file types even though they are explicitly configured in the settings.

Note: *.pdf (a built-in Document type) is still present in the filter, while all six overlapping Image extensions are missing.

Contributor guide

Open the contributing guide

Research direction

Start in the Agent app's Chat features panel, tracing the File upload settings dialog and the published web chat attachment button. Reproduce the overlapping custom, document, and image extensions in a self-hosted v1.17 setup, then follow how the file-picker filter is assembled. Done means Other file types can coexist with Document/Image and every explicitly configured extension appears in the picker filter.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.