fix(upload): route videos to SFS when MIME type is missing#2510
Conversation
When dragging .mov files from Finder, the browser sets an empty file.type. Add a filename extension fallback in chatRuleset so image/video files always route to the static file service.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbitBug Fixes
WalkthroughThe upload utility has been updated to improve static file classification. It now derives file extensions from filenames and uses these extensions alongside MIME type validation when determining if files should be treated as static media. The import from the filename utility has been expanded to include the Changes
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Summary
.movfiles from Finder into a channel input, the browser sets an emptyfile.typeMIME, causing videos to upload to DSS instead of the static file servicechatRulesetso image/video files always route to SFS regardless of MIME typeTest plan
.movfile from Downloads into channel input → uploads as static video.mp4file from Downloads → still uploads as static videobun checkpasses