Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f40c33fa34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (bytes[6].toInt() and 0xFF) == 0x79 && | ||
| (bytes[7].toInt() and 0xFF) == 0x70 | ||
| ) { | ||
| return "video/mp4" |
There was a problem hiding this comment.
Preserve QuickTime MIME instead of forcing MP4
When a user attaches a QuickTime/MOV video, the platform MIME can be video/quicktime, but MOV files also commonly contain an ftyp box, so this branch classifies them as video/mp4 before the caller-provided MIME is considered. That makes the multipart part lie about the media type, and Mastodon instances that validate or route uploads by declared MIME can reject or mishandle otherwise valid MOV uploads; only known MP4 brands should be sniffed as MP4, or the supplied MIME should win for ftyp containers.
Useful? React with 👍 / 👎.
No description provided.