Can not get files when using Code after the Comfyui Tool #8570

Closed
opened 2026-02-21 18:26:23 -05:00 by yindo · 4 comments
Owner

Originally created by @xy3xy3 on GitHub (Feb 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

0.15.3

Cloud or Self Hosted

Cloud

Steps to reproduce

Image

Add a Comfyui's tools and a Code , and try to get the Files for upload.

✔️ Expected Behavior

Find files variable to select

Actual Behavior

However we can't get the output Files.We can only get the text and json.
Image

Image

Originally created by @xy3xy3 on GitHub (Feb 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 0.15.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/cc7714b0-7f5a-4956-911e-9ea03ddffdd9) Add a Comfyui's tools and a Code , and try to get the Files for upload. ### ✔️ Expected Behavior Find files variable to select ### ❌ Actual Behavior However we can't get the output Files.We can only get the text and json. ![Image](https://github.com/user-attachments/assets/c7952aa5-ce43-4863-9596-c7686aeb0696) ![Image](https://github.com/user-attachments/assets/42be38c0-9d56-4355-8801-9ee5b66ac57e)
yindo added the 🔨 feat:toolscloud labels 2026-02-21 18:26:23 -05:00
yindo closed this issue 2026-02-21 18:26:23 -05:00
Author
Owner

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

There is a known limitation in Dify version 0.15.3 regarding file handling in workflows. Specifically, image URLs cannot be accessed in downstream nodes of the Dify workflow, which might be related to the issue you're experiencing with not being able to get the files output after using the ComfyUI tool. This limitation causes protocol errors when attempting to process URLs without 'http://' or 'https://' prefixes [1].

Additionally, the method of adding file uploads to Workflow applications is deprecated. It is recommended to add custom file variables on the start node instead. Workflow applications only support the "Image Upload" feature, and uploaded image files are stored in the sys.files variable for processing [2].

You might want to check if the sys.files variable is being used correctly in your workflow, as this has been a solution in similar issues [3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Feb 24, 2025): <!-- Answer --> There is a known limitation in Dify version 0.15.3 regarding file handling in workflows. Specifically, image URLs cannot be accessed in downstream nodes of the Dify workflow, which might be related to the issue you're experiencing with not being able to get the `files` output after using the ComfyUI tool. This limitation causes protocol errors when attempting to process URLs without 'http://' or 'https://' prefixes <sup>[[1]](https://github.com/langgenius/dify/issues/14029)</sup>. Additionally, the method of adding file uploads to Workflow applications is deprecated. It is recommended to add custom file variables on the start node instead. Workflow applications only support the "Image Upload" feature, and uploaded image files are stored in the `sys.files` variable for processing <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/additional-features.md)</sup>. You might want to check if the `sys.files` variable is being used correctly in your workflow, as this has been a solution in similar issues <sup>[[3]](https://github.com/langgenius/dify/issues/10235)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f1ff92e1-a13a-4987-8f0d-b07f14d6122a?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Feb 24, 2025):

We do not support parsing file in the Code node at this moment, if you want to do it, please use feature request template instead.

@crazywoola commented on GitHub (Feb 24, 2025): We do not support parsing file in the `Code` node at this moment, if you want to do it, please use feature request template instead.
Author
Owner

@maryhh commented on GitHub (Feb 25, 2025):

hi, do you have any idea to solve it ?

@maryhh commented on GitHub (Feb 25, 2025): hi, do you have any idea to solve it ?
Author
Owner

@SomaLily commented on GitHub (Apr 2, 2025):

I even cannot get JSON appropriately from fastapi. And every callback in workflow from my tools must link to a code node for converting TEXT to JSON. Why.

@SomaLily commented on GitHub (Apr 2, 2025): I even cannot get JSON appropriately from fastapi. And every callback in workflow from my tools must link to a code node for converting TEXT to JSON. Why.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8570