Skip to content
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

cannot get the resource of icon in workspace when add tools. #14570

Open
5 tasks done
NDBXQ opened this issue Feb 28, 2025 · 1 comment
Open
5 tasks done

cannot get the resource of icon in workspace when add tools. #14570

NDBXQ opened this issue Feb 28, 2025 · 1 comment
Labels
🐞 bug Something isn't working

Comments

@NDBXQ
Copy link

NDBXQ commented Feb 28, 2025

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

1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

cannot get the resource of icon in workspace when add tools.

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 28, 2025
Copy link

dosubot bot commented Feb 28, 2025

The 404 Not Found error when trying to get the resource of an icon in the workspace could be due to an incorrect or missing tenant_id or filename in the URL. The useGetIcon function constructs the URL for the icon using the currentWorkspace.id and the provided fileName. If either of these values is incorrect or if the file does not exist at the specified location, it would result in a 404 error.

Ensure that currentWorkspace.id is correctly set and that the fileName you are passing to getIconUrl is correct and corresponds to an existing resource. Here is the relevant code snippet:

const getIconUrl = useCallback((fileName: string) => {
  return `${apiPrefix}/workspaces/current/plugin/icon?tenant_id=${currentWorkspace.id}&filename=${fileName}`
}, [currentWorkspace.id])

Check the values of currentWorkspace.id and fileName to resolve the issue [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant