[WIKI-520] fix: update content disposition handling in asset download endpoints#7380
[WIKI-520] fix: update content disposition handling in asset download endpoints#7380
Conversation
WalkthroughThe changes update how presigned URLs are generated for asset downloads by altering the handling of the content-disposition header and filename. The filename is now determined from asset attributes or a generated UUID, and the storage utility's default filename is set to a UUID if none is provided. No other logic or flow is affected. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/api/plane/app/views/asset/v2.py(2 hunks)apps/api/plane/settings/storage.py(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
apps/api/plane/settings/storage.py (1)
3-3: Import addition looks good.The UUID import is necessary for the filename generation functionality.
apps/api/plane/app/views/asset/v2.py (2)
743-744: Excellent fix for content disposition handling.The change properly separates the disposition type from the filename, which should resolve the S3 errors with filenames containing spaces. The filename extraction from asset attributes with UUID fallback is well-implemented.
771-772: Consistent implementation across endpoints.The same fix is properly applied to the project asset download endpoint, maintaining consistency across the codebase.
Description
Type of Change
Test Scenarios
References
WIKI-520
Summary by CodeRabbit