Skip to content

fix(upload): route videos to SFS when MIME type is missing#2510

Merged
gbirman merged 1 commit into
mainfrom
macro-cyVuthb6Zr18Qn2qAVeKD-channel-video-uploads-always-go-to-sfs
Apr 10, 2026
Merged

fix(upload): route videos to SFS when MIME type is missing#2510
gbirman merged 1 commit into
mainfrom
macro-cyVuthb6Zr18Qn2qAVeKD-channel-video-uploads-always-go-to-sfs

Conversation

@gbirman
Copy link
Copy Markdown
Contributor

@gbirman gbirman commented Apr 10, 2026

Summary

  • When dragging .mov files from Finder into a channel input, the browser sets an empty file.type MIME, causing videos to upload to DSS instead of the static file service
  • Added a filename extension fallback in chatRuleset so image/video files always route to SFS regardless of MIME type

Test plan

  • Drag a .mov file from Downloads into channel input → uploads as static video
  • Drag a .mp4 file from Downloads → still uploads as static video
  • Paste a video from clipboard → still works
  • bun check passes
  • Existing upload tests pass

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.
@gbirman gbirman requested a review from a team as a code owner April 10, 2026 19:29
@macro-application
Copy link
Copy Markdown

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 20bce062-7c5b-4992-a7e5-0468d62e2dd5

📥 Commits

Reviewing files that changed from the base of the PR and between 4875f26 and 7fc48b3.

📒 Files selected for processing (1)
  • js/app/packages/core/util/upload.ts

📝 Walkthrough

Summary by CodeRabbit

Bug Fixes

  • Improved file upload handling to better recognize and classify image and video files, ensuring more reliable file processing during uploads.

Walkthrough

The 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 fileExtension function.

Changes

Cohort / File(s) Summary
Upload utility enhancement
js/app/packages/core/util/upload.ts
Enhanced chatRuleset to derive an additional ext value using fileExtension(file.name) and extended static file detection logic to include filename-derived extensions for image and video types. Expanded import from @service-storage/util/filename to include fileExtension export.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format (fix:) and is under 72 characters (58 characters), clearly describing the main fix for routing videos to SFS when MIME type is missing.
Description check ✅ Passed The description is clearly related to the changeset, explaining the problem with .mov files and the filename extension fallback solution implemented in the upload utility.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

@gbirman gbirman merged commit b52f555 into main Apr 10, 2026
23 of 24 checks passed
@gbirman gbirman deleted the macro-cyVuthb6Zr18Qn2qAVeKD-channel-video-uploads-always-go-to-sfs branch April 10, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant