dify icon indicating copy to clipboard operation
dify copied to clipboard

when answer the question icon_url refresh frequently

Open gaspire opened this issue 9 months ago • 2 comments

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

v1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when answer the question icon_url refresh frequently, the url always request: /files/e11ebb9a-93ea-4774-9371-8cfd434a74b1/file-preview?timestamp=1741046816&nonce=947a0a4ed04f0ddd418eccfdc55e39d5&sign=AMSobmXVi95ejqYx6ZUBOY8KUfOpFc6CyJotM3EhKIs=

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

gaspire avatar Mar 04 '25 00:03 gaspire

The frequent refresh of the icon_url you are experiencing might be related to how the Dify application handles file-preview requests. The icon_url is used to generate URLs for accessing icons, and these URLs include query parameters like timestamp, nonce, and sign to ensure secure access [1][2].

The repeated requests you see could be due to the way the application is set up to handle these URLs, possibly not caching them effectively or re-requesting them unnecessarily. Unfortunately, there is no specific information available about caching mechanisms or optimizations in place for icon_url in the Dify codebase [1].

To address this issue, you might want to look into implementing caching strategies or reviewing the logic that triggers these requests to ensure they are only made when necessary. This could help reduce the frequency of these requests and improve performance.

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

dosubot[bot] avatar Mar 04 '25 00:03 dosubot[bot]

update the file web/app/components/base/hook.ts , fix the refresh icon_url

Image

gaspire avatar Mar 05 '25 06:03 gaspire

Fixed in #15601

crazywoola avatar Mar 14 '25 01:03 crazywoola