Fail to get url attribute of FileUpload output of the Start Node #7329

Closed
opened 2026-02-21 18:20:01 -05:00 by yindo · 3 comments
Owner

Originally created by @mingqxu7 on GitHub (Dec 20, 2024).

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I am working on a workflow that includes a Start Node, followed by a Code Node, and concludes with an End Node. Here's the intended functionality:

Start Node: Prompts the user to input a single image file.
Code Node: Processes the image by reading the file and calling an OCR service to extract recognized text.
End Node: Outputs the OCR recognition results.
The issue arises with the Start Node's output. While it correctly generates a URL, as shown below:

"url": "/files/6ed3b77a-9338-4829-a0d3-ceff0a3fa8c8/file-preview?timestamp=1734723980&nonce=0c79b8dd98086e944d893226ec735c4c&sign=YlfvexNFyQPc_vbqWKWHjVrWn_hStW5In4RGafTo47c="

When the Code Node attempts to access this output, it receives an empty string ("") instead. This discrepancy prevents me from processing the image file and disrupts any subsequent vision-related workflows. It also blocks the integration of this workflow into a pre-processing pipeline for a multi-modal LLM.

I've attached the workflow configuration file for your reference. The file doesn't contain any private information, though I had to rename it to .txt for attachment purposes:

fileupload.yml.txt

✔️ Expected Behavior

In the Code node, file.url as a non-empty string in the form of "/files/6ed3b77a-9338-4829-a0d3-ceff0a3fa8c8/file-preview?timestamp=1734723980&nonce=0c79b8dd98086e944d893226ec735c4c&sign=YlfvexNFyQPc_vbqWKWHjVrWn_hStW5In4RGafTo47c="

Actual Behavior

In the Code node, file.url is an empty string.

Originally created by @mingqxu7 on GitHub (Dec 20, 2024). ### 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.13.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I am working on a workflow that includes a Start Node, followed by a Code Node, and concludes with an End Node. Here's the intended functionality: Start Node: Prompts the user to input a single image file. Code Node: Processes the image by reading the file and calling an OCR service to extract recognized text. End Node: Outputs the OCR recognition results. The issue arises with the Start Node's output. While it correctly generates a URL, as shown below: "url": "/files/6ed3b77a-9338-4829-a0d3-ceff0a3fa8c8/file-preview?timestamp=1734723980&nonce=0c79b8dd98086e944d893226ec735c4c&sign=YlfvexNFyQPc_vbqWKWHjVrWn_hStW5In4RGafTo47c=" When the Code Node attempts to access this output, it receives an empty string ("") instead. This discrepancy prevents me from processing the image file and disrupts any subsequent vision-related workflows. It also blocks the integration of this workflow into a pre-processing pipeline for a multi-modal LLM. I've attached the workflow configuration file for your reference. The file doesn't contain any private information, though I had to rename it to .txt for attachment purposes: [fileupload.yml.txt](https://github.com/user-attachments/files/18214875/fileupload.yml.txt) ### ✔️ Expected Behavior In the Code node, file.url as a non-empty string in the form of "/files/6ed3b77a-9338-4829-a0d3-ceff0a3fa8c8/file-preview?timestamp=1734723980&nonce=0c79b8dd98086e944d893226ec735c4c&sign=YlfvexNFyQPc_vbqWKWHjVrWn_hStW5In4RGafTo47c=" ### ❌ Actual Behavior In the Code node, file.url is an empty string.
yindo added the 🐞 bug🌊 feat:workflow labels 2026-02-21 18:20:01 -05:00
yindo closed this issue 2026-02-21 18:20:01 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 20, 2024):

In Dify version 0.13.0, the url property in code nodes returns an empty string. Instead, you should use file.remote_url to retrieve the actual URL of the uploaded file. This change was introduced in Dify 0.13.2, and it seems to be applicable to your situation as well [1].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Dec 20, 2024): <!-- Answer --> In Dify version 0.13.0, the `url` property in code nodes returns an empty string. Instead, you should use `file.remote_url` to retrieve the actual URL of the uploaded file. This change was introduced in Dify 0.13.2, and it seems to be applicable to your situation as well <sup>[[1]](https://github.com/langgenius/dify/issues/11543)</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/60306d44-7990-4922-af20-07f66f2ba5ae?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/60306d44-7990-4922-af20-07f66f2ba5ae?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/60306d44-7990-4922-af20-07f66f2ba5ae?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/60306d44-7990-4922-af20-07f66f2ba5ae?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/60306d44-7990-4922-af20-07f66f2ba5ae?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/60306d44-7990-4922-af20-07f66f2ba5ae?feedback_type=other)</sup>
Author
Owner

@mingqxu7 commented on GitHub (Dec 20, 2024):

I upgraded to 0.14.1, to no avail. There is no selection of the "remote_url" field in the Code node:

image
@mingqxu7 commented on GitHub (Dec 20, 2024): I upgraded to 0.14.1, to no avail. There is no selection of the "remote_url" field in the Code node: <img width="502" alt="image" src="https://github.com/user-attachments/assets/b069995c-e2a3-4c28-b1c5-897855518308" />
Author
Owner

@crazywoola commented on GitHub (Dec 20, 2024):

Duplicated see the existing discussion https://github.com/langgenius/dify/discussions/10687

@crazywoola commented on GitHub (Dec 20, 2024): Duplicated see the existing discussion https://github.com/langgenius/dify/discussions/10687
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7329