[PR #24696] fix(datasource): load default fileExtensions for file node earlier #30752

Closed
opened 2026-02-21 20:48:09 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24696

State: closed
Merged: Yes


Summary

This is for the feat/rag-2 branch.

Closes #25304

Issues to be solved

With specific steps, the fileExtensions option will be null and the Browse link will disappear. See the Before in Screenshots section.

  • Create a new pipeline
  • Place the File datasource node
  • IMPORTANT: From now on, do not open the panel for this node
  • Connect and configure the extractor, chunker, and vdb
  • Ensure there are no validation errors
  • Invoke Test Run

You will notice that there is no Browse link, and if you export the DSL, there is no fileExtensions property. You can still try uploading files by drag and drop, but it won't be accepted.

In the current implementation, the default fileExtensions are loaded when the panel for this node is opened.
This means that if the user never opens the panel until they publish the pipeline, fileExtensions has no value and the pipeline cannot accept any file extensions.
This is a possible scenario that can actually occur when the users want to leave all of the file node settings at their default values.

Changes in this PR

This PR makes the default fileExtensions value load when placing the node, instead of when opening the panel.
I'm not sure if this is the best solution, but I wanted to let you know about the issue and suggest an idea to solve it.

Of course it's okay to close this if there is an appropriate alternative solution.

F.Y.I. @crazywoola

Screenshots

Before After
Image Image Image Image

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/24696 **State:** closed **Merged:** Yes --- ## Summary This is for the ✨ **feat/rag-2** branch. Closes #25304 ### Issues to be solved With specific steps, the `fileExtensions` option will be null and the `Browse` link will disappear. See the `Before` in `Screenshots` section. - Create a new pipeline - Place the File datasource node - **IMPORTANT: From now on, do not open the panel for this node** - Connect and configure the extractor, chunker, and vdb - Ensure there are no validation errors - Invoke `Test Run` You will notice that there is no `Browse` link, and if you export the DSL, there is no `fileExtensions` property. You can still try uploading files by drag and drop, but it won't be accepted. In the current implementation, the default `fileExtensions` are loaded **when the panel for this node is opened**. This means that if the user never opens the panel until they publish the pipeline, `fileExtensions` has no value and the pipeline cannot accept any file extensions. This is a possible scenario that can actually occur when the users want to leave all of the file node settings at their default values. ### Changes in this PR This PR makes the default `fileExtensions` value load **when placing the node**, instead of when opening the panel. I'm not sure if this is the best solution, but I wanted to let you know about the issue and suggest an idea to solve it. Of course it's okay to close this if there is an appropriate alternative solution. F.Y.I. @crazywoola ## Screenshots | Before | After | |--------|-------| | <img width="913" height="610" alt="Image" src="https://github.com/user-attachments/assets/0e5dac65-b0df-460f-9de6-b5b918fc081a" /> <img width="298" height="476" alt="Image" src="https://github.com/user-attachments/assets/71a29cf0-eda2-43d3-a420-fa57eb1f437e" /> | <img width="910" height="491" alt="Image" src="https://github.com/user-attachments/assets/f57fd0a6-e2b3-4e1a-a4a5-ce948a045350" /> <img width="342" height="846" alt="Image" src="https://github.com/user-attachments/assets/0f74bf97-43c4-4b19-bd28-1e7d626c8dfe" /> | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [ ] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:48:09 -05:00
yindo closed this issue 2026-02-21 20:48:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30752