[PR #18930] if as_attachment is in the url, add it to the sign_url #29032

Closed
opened 2026-02-21 20:44:44 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/18930

State: closed
Merged: Yes


Fixes #18921
‌Changes Made:‌

Modified the re_sign_file_url_answer method to include the as_attachment=True parameter when regenerating file URLs.
Ensured that the as_attachment parameter is preserved during URL re-signing to maintain correct file extension handling.
‌Testing:‌

Verified that downloaded files now retain their original extensions by checking both the before and after scenarios.
Added test cases to confirm that the as_attachment parameter is included in re-signed URLs.

**Original Pull Request:** https://github.com/langgenius/dify/pull/18930 **State:** closed **Merged:** Yes --- Fixes #18921 ‌Changes Made:‌ Modified the re_sign_file_url_answer method to include the as_attachment=True parameter when regenerating file URLs. Ensured that the as_attachment parameter is preserved during URL re-signing to maintain correct file extension handling. ‌Testing:‌ Verified that downloaded files now retain their original extensions by checking both the before and after scenarios. Added test cases to confirm that the as_attachment parameter is included in re-signed URLs.
yindo added the pull-request label 2026-02-21 20:44:44 -05:00
yindo closed this issue 2026-02-21 20:44:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#29032