How can I create an array[file] type during a process within my workflow? #20875

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

Originally created by @KrisHe666 on GitHub (Dec 8, 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

How can I create an array[file] type during a process within my workflow?

✔️ Expected Behavior

1

Actual Behavior

No response

Originally created by @KrisHe666 on GitHub (Dec 8, 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 How can I create an array[file] type during a process within my workflow? ### ✔️ Expected Behavior 1 ### ❌ Actual Behavior _No response_
yindo added the 🙋‍♂️ question label 2026-02-21 20:09:37 -05:00
yindo closed this issue 2026-02-21 20:09:37 -05:00
Author
Owner

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

Dify v1.10.1 natively supports the array[file] type in workflows. This is handled in the backend by the ArrayFileSegment class and related logic, which allows workflow steps to output and consume arrays of files as variables. For example, when a tool node or system variable (like sys.files) emits multiple files, these are collected into an array[file] and passed to downstream nodes as a list of File objects wrapped in an ArrayFileSegment. This enables batch file processing or multi-file outputs within your workflow steps. You can reference or pass these arrays between nodes using the variable pool or system variable path (e.g., sys.files) citation citation.

However, Dify currently lacks direct file management features in the workflow UI or API, so while you can pass and process arrays of files between workflow steps, you can't yet manage, cache, or reuse uploaded files across runs through the UI citation. For most use cases, you can configure your workflow nodes to accept or output array[file] variables, and Dify will handle the type correctly in the backend. If you need to process multiple files, ensure your node outputs or expects an array[file] type, and connect the variables accordingly in your workflow graph.

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 8, 2025): <!-- Answer --> Dify v1.10.1 natively supports the array[file] type in workflows. This is handled in the backend by the ArrayFileSegment class and related logic, which allows workflow steps to output and consume arrays of files as variables. For example, when a tool node or system variable (like sys.files) emits multiple files, these are collected into an array[file] and passed to downstream nodes as a list of File objects wrapped in an ArrayFileSegment. This enables batch file processing or multi-file outputs within your workflow steps. You can reference or pass these arrays between nodes using the variable pool or system variable path (e.g., sys.files) [citation](https://github.com/langgenius/dify/blob/14d1b3f9b354e2a8528cb27299d723707bb3f4db/api/core/variables/segments.py#L186-L253) [citation](https://github.com/langgenius/dify/blob/14d1b3f9b354e2a8528cb27299d723707bb3f4db/api/core/workflow/nodes/tool/tool_node.py#L42-L445). However, Dify currently lacks direct file management features in the workflow UI or API, so while you can pass and process arrays of files between workflow steps, you can't yet manage, cache, or reuse uploaded files across runs through the UI [citation](https://github.com/langgenius/dify-docs/issues/511). For most use cases, you can configure your workflow nodes to accept or output array[file] variables, and Dify will handle the type correctly in the backend. If you need to process multiple files, ensure your node outputs or expects an array[file] type, and connect the variables accordingly in your workflow graph. <!-- 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/45beb1bb-3833-4bd4-9189-95bf870c8f10?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/45beb1bb-3833-4bd4-9189-95bf870c8f10?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/45beb1bb-3833-4bd4-9189-95bf870c8f10?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/45beb1bb-3833-4bd4-9189-95bf870c8f10?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/45beb1bb-3833-4bd4-9189-95bf870c8f10?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/45beb1bb-3833-4bd4-9189-95bf870c8f10?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/45beb1bb-3833-4bd4-9189-95bf870c8f10?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=Dify%20v1.10.1%20natively%20supports%20the%20array%5Bfile%5D%20type%20in%20workflows.%20This%20is%20handled%20in%20the%20backend%20by%20the%20ArrayFileSegment%20class%20and%20related%20logic%2C%20which%20allows%20workflow%20steps%20to%20output%20and%20consume%20arrays%20of%20files%20as%20variables.%20For%20example%2C%20when%20a%20tool%20node%20or%20system%20variable%20%28like%20sys.files%29%20emits%20multiple%20files%2C%20these%20are%20collected%20into%20an%20array%5Bfile%5D%20and%20passed%20to%20downstream%20nodes%20as%20a%20list%20of%20File%20objects%20wrapped%20in%20an%20ArrayFileSegment.%20This%20enables%20batch%20file%20processing%20or%20multi-file%20outputs%20within%20your%20workflow%20steps.%20You%20can%20reference%20or%20pass%20these%20arrays%20between%20nodes%20using%20the%20variable%20pool%20or%20system%20variable%20path%20%28e.g.%2C%20sys.files%29%C2%A0%5Bcitation%5D%28https%3A//github.com/langgenius/dify/blob/14d1b3f9b354e2a8528cb27299d723707bb3f4db/api/core/variables/segments.py%23L186-L253%29%C2%A0%5Bcitation%5D%28https%3A//github.com/langgenius/dify/blob/14d1b3f9b354e2a8528cb27299d723707bb3f4db/api/core/workflow/nodes/tool/tool_node.py%23L42-L445%29.%0A%0AHowever%2C%20Dify%20currently%20lacks%20direct%20file%20management%20features%20in%20the%20workflow%20UI%20or%20API%2C%20so%20while%20you%20can%20pass%20and%20process%20arrays%20of%20files%20between%20workflow%20steps%2C%20you%20can%27t%20yet%20manage%2C%20cache%2C%20or%20reuse%20uploaded%20files%20across%20runs%20through%20the%20UI%C2%A0%5Bcitation%5D%28https%3A//github.com/langgenius/dify-docs/issues/511%29.%20For%20most%20use%20cases%2C%20you%20can%20configure%20your%20workflow%20nodes%20to%20accept%20or%20output%20array%5Bfile%5D%20variables%2C%20and%20Dify%20will%20handle%20the%20type%20correctly%20in%20the%20backend.%20If%20you%20need%20to%20process%20multiple%20files%2C%20ensure%20your%20node%20outputs%20or%20expects%20an%20array%5Bfile%5D%20type%2C%20and%20connect%20the%20variables%20accordingly%20in%20your%20workflow%20graph.)&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/29311)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20875