[FIX] Save and serve files with correct Content-Type#4404
[FIX] Save and serve files with correct Content-Type#4404kwerie wants to merge 9 commits intovendurehq:masterfrom
Conversation
PDFs were served with application/octet-stream, causing Chromium-based browsers to download them instead of opening them in a new tab. Add application/pdf to the MIME type mapping so PDFs are served with the correct Content-Type header.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds PDF MIME-type handling to the asset-server-plugin: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
biggamesmallworld
left a comment
There was a problem hiding this comment.
Great fix! The S3 ContentType addition is a valuable improvement beyond just the serving-side fix. Thanks for the contribution.
Description
PDFs were served with application/octet-stream, causing Chromium-based browsers to download them instead of opening them in a new tab. Add application/pdf to the MIME type mapping so PDFs are served with the correct Content-Type header.
Also when saving files to an S3 bucket, the content type wasn't being set.
Breaking changes
No
Screenshots
N/A
Checklist
📌 Always:
👍 Most of the time:
Fixes #4403