langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.51k stars 7.44k forks source link

some node can't get correct url of a file #9567

Open hjlarry opened 3 weeks ago

hjlarry commented 3 weeks ago

Self Checks

Dify version

0.10.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. add a start node, list operator node, and an end node.
  2. 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

image

dosubot[bot] commented 3 weeks ago

I found some relevant information that might help with the issue you're experiencing regarding file URLs in a self-hosted Dify setup.

  1. 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].

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

  3. Configuration Issues: In a self-hosted environment, incorrect FILES_URL configuration or storage configuration issues could lead to problems with file URL retrieval. Ensure that FILES_URL is configured as an externally accessible address and that the storage directory is properly mounted [4].

  4. Error Handling: There are error handling mechanisms in place for file URL generation. For example, in the RemoteFileInfoApi class, exceptions are caught and returned as a JSON response with a 400 status code, which can help identify issues during URL processing [5].

  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 ToolFileManager class [6].

You might want to check these configurations and logs to diagnose the issue further.

To continue talking to Dosu, mention @dosu.

hjlarry commented 3 weeks ago

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

1linedata commented 3 weeks ago

same here

nne998 commented 3 weeks ago

same as #9681 #9681

gms5144 commented 2 weeks ago

The problem still exists at present.

tsugitta commented 2 weeks ago

Are there any workarounds?

xs818818 commented 2 weeks ago

10.2没有解决这个问题

Yifan-Chang-Jerry commented 1 week ago

is this problem fixed in 0.11.0?

laipz8200 commented 1 week ago

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.

AnoyiX commented 14 hours ago

not fixed yet 😔