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.82k stars 7.51k forks source link

In the file upload scenario, the file link url carries parameters bug #10546

Closed JiesenSun closed 4 days ago

JiesenSun commented 5 days ago

Self Checks

Dify version

0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

For security reasons, files on OSS use temporary URLs(eg: https://dig-ai-trade.oss-cn-beijing.aliyuncs.com/resource/files/20241111/1731315800FQJ6uBUq.pdf?OSSAccessKeyId=LTAI5t8g16ZFABU5jcfDshkh&Expires=1731318323&Signature=XwXfht5EA8bn%2Fjy9ZHVpJiNADWg%3D). But When using the file link method, the URL carries parameters and the following error occurs, see the figure: image The error in the docker container is as follows: image There is no problem with actual code testing and browser access to the URL, as shown below: image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 5 days ago

I found a similar unsolved discussion regarding issues with opening images in Dify, which might be related to your problem with file link URLs carrying parameters. You can check it out here [1].

For your specific issue, it seems like there might be a problem with how URL parameters are being handled in the Docker setup. Unfortunately, I couldn't find specific documentation or code comments in Dify that explain how to troubleshoot file link issues or known bugs related to URL parameter handling. However, you might want to verify the URL signing and validation process to ensure that the parameters are correctly processed and that the URL is valid and not expired. If the issue persists, consider checking the Docker logs for any additional error messages that might provide more insight.

To continue talking to Dosu, mention @dosu.

JiesenSun commented 5 days ago

https://dig-ai-trade.oss-cn-beijing.aliyuncs.com/resource/files/20241111/1731322972LXP8b1vg.pdf?OSSAccessKeyId=LTAI5t8g16ZFABU5jcfDshkh&Expires=1731582197&Signature=zuUPLj0ONr9aM70MBIaaK%2BN%2FL8Q%3D The above URL is valid for 72 hours and can be tested

hjlarry commented 5 days ago

https://dig-ai-trade.oss-cn-beijing.aliyuncs.com/resource/files/20241111/1731322972LXP8b1vg.pdf?OSSAccessKeyId=LTAI5t8g16ZFABU5jcfDshkh&Expires=1731582197&Signature=zuUPLj0ONr9aM70MBIaaK%2BN%2FL8Q%3D The above URL is valid for 72 hours and can be tested

it works for me, please try the cloud version or update your dify version

JiesenSun commented 4 days ago

https://dig-ai-trade.oss-cn-beijing.aliyuncs.com/resource/files/20241111/1731322972LXP8b1vg.pdf?OSSAccessKeyId=LTAI5t8g16ZFABU5jcfDshkh&Expires=1731582197&Signature=zuUPLj0ONr9aM70MBIaaK%2BN%2FL8Q%3D The above URL is valid for 72 hours and can be tested

it works for me, please try the cloud version or update your dify version

Thank you, the bug has been solved after upgrading to version 0.11.1

JiesenSun commented 4 days ago

the bug has been solved after upgrading to version 0.11.1