Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks done
hjlarry opened this issue Oct 21, 2024 · 11 comments
Closed
5 tasks done

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

hjlarry opened this issue Oct 21, 2024 · 11 comments
Assignees
Labels
💪 enhancement New feature or request

Comments

@hjlarry
Copy link
Contributor

hjlarry commented Oct 21, 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.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 dosubot bot added the 🐞 bug Something isn't working label Oct 21, 2024
Copy link

dosubot bot commented Oct 21, 2024

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
Copy link
Contributor Author

hjlarry commented Oct 21, 2024

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
Copy link

same here

@nne998
Copy link

nne998 commented Oct 23, 2024

same as #9681 #9681

@gms5144
Copy link

gms5144 commented Oct 25, 2024

The problem still exists at present.

@tsugitta
Copy link

Are there any workarounds?

@xs818818
Copy link

10.2没有解决这个问题

@Yifan-Chang-Jerry
Copy link

is this problem fixed in 0.11.0?

@laipz8200
Copy link
Collaborator

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.

@laipz8200 laipz8200 added 💪 enhancement New feature or request and removed 🐞 bug Something isn't working labels Nov 6, 2024
@crazywoola crazywoola pinned this issue Nov 11, 2024
@AnoyiX
Copy link

AnoyiX commented Nov 13, 2024

not fixed yet 😔

@laipz8200
Copy link
Collaborator

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.

@laipz8200 laipz8200 converted this issue into discussion #10687 Nov 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
💪 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants