I can't receive the URL of the file after uploading it #8198

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

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

Self Hosted (Source)

Steps to reproduce

Even after I uploaded an image and configured it at the end, I still couldn't correctly obtain the URL of the image.

Image

Image

✔️ Expected Behavior

I hope to obtain the URL of the uploaded file for further processing.

Actual Behavior

Cannot get the url parameter of the uploaded file to the result

Originally created by @everyokday on GitHub (Feb 12, 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 Self Hosted (Source) ### Steps to reproduce Even after I uploaded an image and configured it at the end, I still couldn't correctly obtain the URL of the image. ![Image](https://github.com/user-attachments/assets/c0e2fc4a-d3e5-4ec3-86f0-8ecee7c4bcd8) ![Image](https://github.com/user-attachments/assets/4194480a-3a31-407e-b94d-93decda5a91f) ### ✔️ Expected Behavior I hope to obtain the URL of the uploaded file for further processing. ### ❌ Actual Behavior Cannot get the url parameter of the uploaded file to the result
yindo added the 🐞 bug label 2026-02-21 18:24:26 -05:00
yindo closed this issue 2026-02-21 18:24:27 -05:00
Author
Owner

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

Hello @everyokday! I'm here to help you with any bugs, questions, or contributions you have for the Dify project. Let me know how I can assist you!

I found some relevant discussions and issues that might help you with obtaining the URL of an uploaded file in a self-hosted Dify environment:

  1. How to Use Files During Code Execution? - This discussion suggests using file.remote_url instead of file.url in code execution nodes, as file.url may return null in such contexts [1].

  2. How to get local file url, when upload the file by local uploading? - This issue provides a solution for obtaining the local file URL by using the generate_url method, which checks the transfer_method and uses the related_id to generate a signed file URL [2].

  3. Unable to obtain URL for uploading images - This issue highlights the importance of using the remote_url attribute to get the actual URL of an uploaded image file, especially in code execution nodes [3].

For your specific case in Dify version 0.15.3, you can use the get_signed_file_url function to generate a signed URL for the uploaded file using its upload_file_id. Make sure to call this function with the correct upload_file_id to obtain the URL [4].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Feb 12, 2025): <!-- Greeting --> Hello @everyokday! I'm here to help you with any bugs, questions, or contributions you have for the Dify project. Let me know how I can assist you! <!-- Answer --> I found some relevant discussions and issues that might help you with obtaining the URL of an uploaded file in a self-hosted Dify environment: 1. **[How to Use Files During Code Execution?](https://github.com/langgenius/dify/discussions/11789)** - This discussion suggests using `file.remote_url` instead of `file.url` in code execution nodes, as `file.url` may return null in such contexts <sup>[[1]](https://github.com/langgenius/dify/discussions/11789)</sup>. 2. **[How to get local file url, when upload the file by local uploading?](https://github.com/langgenius/dify/issues/12228)** - This issue provides a solution for obtaining the local file URL by using the `generate_url` method, which checks the `transfer_method` and uses the `related_id` to generate a signed file URL <sup>[[2]](https://github.com/langgenius/dify/issues/12228)</sup>. 3. **[Unable to obtain URL for uploading images](https://github.com/langgenius/dify/issues/11769)** - This issue highlights the importance of using the `remote_url` attribute to get the actual URL of an uploaded image file, especially in code execution nodes <sup>[[3]](https://github.com/langgenius/dify/issues/11769)</sup>. For your specific case in Dify version 0.15.3, you can use the `get_signed_file_url` function to generate a signed URL for the uploaded file using its `upload_file_id`. Make sure to call this function with the correct `upload_file_id` to obtain the URL <sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/file/helpers.py)</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/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=other) | [Bug Report](https://app.dosu.dev/response-feedback/79ee5aeb-4e86-46eb-b5f5-c605714133ab?feedback_type=bug_report)</sup>
Author
Owner

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

This is a known issue. We do not have a plan for this now.

@crazywoola commented on GitHub (Feb 12, 2025): This is a known issue. We do not have a plan for this now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8198