Skip to content

fix mastodon media upload#2116

Merged
Tlaster merged 1 commit intomasterfrom
bugfix/mastodon-upload
May 9, 2026
Merged

fix mastodon media upload#2116
Tlaster merged 1 commit intomasterfrom
bugfix/mastodon-upload

Conversation

@Tlaster
Copy link
Copy Markdown
Contributor

@Tlaster Tlaster commented May 8, 2026

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Tlaster Tlaster merged commit 59c0f74 into master May 9, 2026
8 checks passed
@Tlaster Tlaster deleted the bugfix/mastodon-upload branch May 9, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant