fix: The url output by the list_operator is null #6702

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

Originally created by @sunxiaojia123 on GitHub (Nov 12, 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.11.1

Cloud or Self Hosted

Cloud

Steps to reproduce

I want to use the list operation module to extract the URL of the file file, including the dify cloud and local deployment operations, and the workflow shows that it can be completed. As shown below:

image

However, on the dify cloud, the output is null, and in the local deployment, the output is path, but it does not contain parameters and cannot be used. As shown below:

image

The url can be output in the first or last data obtained by list_operator. After reference, url is not a field of File model, but a field processed by self.generate_url(). However, the code uses the direct output of remote_url, which is often an incomplete field or null, so it is more reasonable to replace it with a field generated by generate_url()

✔️ Expected Behavior

image_url,As shown below:
image

Actual Behavior

"url": null

Originally created by @sunxiaojia123 on GitHub (Nov 12, 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.11.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce ### I want to use the list operation module to extract the URL of the file file, including the dify cloud and local deployment operations, and the workflow shows that it can be completed. As shown below: <img width="1429" alt="image" src="https://github.com/user-attachments/assets/c6687fcb-ef58-4dd2-810e-d3fe8811980f"> ### However, on the dify cloud, the output is null, and in the local deployment, the output is path, but it does not contain parameters and cannot be used. As shown below: <img width="1396" alt="image" src="https://github.com/user-attachments/assets/1c3c46cc-f0eb-4ece-8fef-1028f1bed761"> ### The url can be output in the first or last data obtained by list_operator. After reference, url is not a field of File model, but a field processed by self.generate_url(). However, the code uses the direct output of remote_url, which is often an incomplete field or null, so it is more reasonable to replace it with a field generated by generate_url() ### ✔️ Expected Behavior image_url,As shown below: <img width="292" alt="image" src="https://github.com/user-attachments/assets/4015386f-5329-4393-97d1-7d1e496b4447"> ### ❌ Actual Behavior "url": null
yindo added the 🐞 bug label 2026-02-21 18:16:55 -05:00
yindo closed this issue 2026-02-21 18:16:55 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 12, 2024):

I found a similar discussion regarding file URL issues in Dify, specifically about the file URL not matching the file location in S3 for a self-hosted instance. You can check it out here [1].

Regarding your issue, it seems that the list_operator module is directly using the remote_url attribute, which can be null or incomplete. Instead, it would be more appropriate to use the generate_url() function from the File model. This function generates a complete and usable URL based on the file's attributes and transfer method [2].

To resolve this, you might need to modify the code to use generate_url() instead of directly accessing remote_url. This change should ensure that the URLs are correctly generated and not null.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 12, 2024): <!-- Answer --> I found a similar discussion regarding file URL issues in Dify, specifically about the file URL not matching the file location in S3 for a self-hosted instance. You can check it out [here](https://github.com/langgenius/dify/discussions/6729) <sup>[[1]](https://github.com/langgenius/dify/discussions/6729)</sup>. Regarding your issue, it seems that the `list_operator` module is directly using the `remote_url` attribute, which can be null or incomplete. Instead, it would be more appropriate to use the `generate_url()` function from the `File` model. This function generates a complete and usable URL based on the file's attributes and transfer method <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/file/models.py)</sup>. To resolve this, you might need to modify the code to use `generate_url()` instead of directly accessing `remote_url`. This change should ensure that the URLs are correctly generated and not null. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@XiaoLey commented on GitHub (Nov 12, 2024):

hi, this issue has been fixed in PR #10513. just hang tight while it gets merged. 😊

@XiaoLey commented on GitHub (Nov 12, 2024): hi, this issue has been fixed in PR #10513. just hang tight while it gets merged. 😊
Author
Owner

@laipz8200 commented on GitHub (Nov 14, 2024):

duplicated with #9567

@laipz8200 commented on GitHub (Nov 14, 2024): duplicated with #9567
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6702