Fail to get file.url, output empty string #6666

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

Originally created by @AnoyiX on GitHub (Nov 10, 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

v0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

WX20241111-113825

input a file, and output the file url

✔️ Expected Behavior

output the signed file url

Actual Behavior

output empty string

Originally created by @AnoyiX on GitHub (Nov 10, 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 v0.11.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![WX20241111-113825](https://github.com/user-attachments/assets/12c697d6-63f8-4f08-ad7c-a045f79fd545) input a file, and output the file url ### ✔️ Expected Behavior output the signed file url ### ❌ Actual Behavior output empty string
yindo added the 🐞 bug label 2026-02-21 18:16:45 -05:00
yindo closed this issue 2026-02-21 18:16:45 -05:00
Author
Owner

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

@AnoyiX Hello! I'm here to help you with any bugs, questions, or contributions while we wait for a human maintainer. Let's tackle this issue together!

I found a similar closed issue where the model results in the workflow kept returning empty. The suggested solution involved ensuring that the ParameterExtractorNode correctly extracts results from function calls or text responses. Additionally, if you're using the Ollama service, make sure it is accessible from the Docker container by using host.docker.internal in the service URL instead of localhost [1].

For your specific issue with the file.url returning an empty string, it might be related to the configuration settings or the method used for generating the URL. The generate_url method in api/core/file/models.py is responsible for this, and it uses the get_signed_file_url function from api/core/file/helpers.py to construct a secure URL. Ensure that the configuration settings like APP_WEB_URL and FILES_URL are correctly set, as they are crucial for file URL generation and access [2][3].

Additionally, check the logging and debugging capabilities in Dify to diagnose the issue further. The create_file_by_url method logs exceptions if file downloads fail, which might provide more insights into why the URL is not being generated [4].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 10, 2024): <!-- Greeting --> @AnoyiX Hello! I'm here to help you with any bugs, questions, or contributions while we wait for a human maintainer. Let's tackle this issue together! <!-- Answer --> I found a similar closed issue where the model results in the workflow kept returning empty. The suggested solution involved ensuring that the `ParameterExtractorNode` correctly extracts results from function calls or text responses. Additionally, if you're using the Ollama service, make sure it is accessible from the Docker container by using `host.docker.internal` in the service URL instead of `localhost` <sup>[[1]](https://github.com/langgenius/dify/issues/6957)</sup>. For your specific issue with the `file.url` returning an empty string, it might be related to the configuration settings or the method used for generating the URL. The `generate_url` method in `api/core/file/models.py` is responsible for this, and it uses the `get_signed_file_url` function from `api/core/file/helpers.py` to construct a secure URL. Ensure that the configuration settings like `APP_WEB_URL` and `FILES_URL` are correctly set, as they are crucial for file URL generation and access <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/file/helpers.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/file/models.py)</sup>. Additionally, check the logging and debugging capabilities in Dify to diagnose the issue further. The `create_file_by_url` method logs exceptions if file downloads fail, which might provide more insights into why the URL is not being generated <sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/tools/tool_file_manager.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Nov 10, 2024):

Duplicated https://github.com/langgenius/dify/issues/9567

@crazywoola commented on GitHub (Nov 10, 2024): Duplicated https://github.com/langgenius/dify/issues/9567
Author
Owner

@yhXu1 commented on GitHub (Oct 13, 2025):

请问,现在这个问题解决了吗?我在使用mineru插件的过程中,发现“开始”节点存在着文件的url但是在传递给mineru时,这个url就会消失。这个问题好像跟您的这个类似

@yhXu1 commented on GitHub (Oct 13, 2025): 请问,现在这个问题解决了吗?我在使用mineru插件的过程中,发现“开始”节点存在着文件的url但是在传递给mineru时,这个url就会消失。这个问题好像跟您的这个类似
Author
Owner

@AI-Hao07 commented on GitHub (Nov 14, 2025):

我也是 从mineru得到的图片链接会失效,存入知识库中 图片并不能返回显示出来

@AI-Hao07 commented on GitHub (Nov 14, 2025): 我也是 从mineru得到的图片链接会失效,存入知识库中 图片并不能返回显示出来
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6666