some node can't get correct url of a file
Self Checks
- [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [X] I have searched for existing issues search for existing issues, including closed ones.
- [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [X] Please do not modify this template :) and fill in all the required fields.
Dify version
0.10.0
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
- add a start node, list operator node, and an end node.
- upload any local file in the start node, in the end node get list operator node's url
✔️ Expected Behavior
get the correct file url
❌ Actual Behavior
not get the correct value
I found some relevant information that might help with the issue you're experiencing regarding file URLs in a self-hosted Dify setup.
-
Similar Issues: There is a similar open issue titled "seems that some variables are lost after the Parameter Extraction node" [1]. This issue was referenced by other issues related to input variables not being updated correctly [2].
-
Potential Causes: The list operator node might return a null value if no array elements meet the specified filter conditions. This could happen if the filter conditions are too restrictive or if the input array does not contain any elements that match the criteria [3].
-
Configuration Issues: In a self-hosted environment, incorrect
FILES_URLconfiguration or storage configuration issues could lead to problems with file URL retrieval. Ensure thatFILES_URLis configured as an externally accessible address and that the storage directory is properly mounted [4]. -
Error Handling: There are error handling mechanisms in place for file URL generation. For example, in the
RemoteFileInfoApiclass, exceptions are caught and returned as a JSON response with a 400 status code, which can help identify issues during URL processing [5]. -
Logging: There is logging available in the codebase that could help identify issues with file URL generation. For instance, errors in downloading files from a URL are logged in the
ToolFileManagerclass [6].
You might want to check these configurations and logs to diagnose the issue further.
To continue talking to Dosu, mention @dosu.
the remote_url and the url attr of File is not so much clear
I think the remote_url attr is necessary, for example, I use a tool generate an image, use another tool edit or vectorize the image. directly transfer the first tool response url to the second tool is more efficient
same here
same as #9681 #9681
The problem still exists at present.
Are there any workarounds?
10.2没有解决这个问题
is this problem fixed in 0.11.0?
I need to provide an explanation regarding this issue: currently, File.url refers to the remote_url attribute shown in the logs. The url in the logs is a signed, short-lived temporary address, and it currently cannot be referenced within the Workflow.
not fixed yet 😔
Now, the question is how we should handle these URLs that will expire soon. They might appear in the current chat, show up in logs, and users could even notice that these addresses quickly become inaccessible within the same conversation (if the chat lasts long enough).
I don’t think opening temporary signed URLs is a very elegant solution. We need to find a more practical way to allow users to access the files.