Skip to content

fix(commands): detect MIME type from file extension for images#43

Merged
RyanLee-Dev merged 1 commit intomainfrom
fix/mime-type-detection
Apr 6, 2026
Merged

fix(commands): detect MIME type from file extension for images#43
RyanLee-Dev merged 1 commit intomainfrom
fix/mime-type-detection

Conversation

@EElaineYIN
Copy link
Copy Markdown

Summary

  • Add MIME type detection based on file extension for video generate --first-frame and image generate --subject-ref
  • Previously all local images were sent as data:image/jpeg regardless of actual format
  • Supports: .jpg, .jpeg, .png, .webp (falls back to jpeg for unknown extensions)

Test plan

  • --first-frame test.png --dry-rundata:image/png;base64,...
  • --first-frame test.jpg --dry-rundata:image/jpeg;base64,...

🤖 Generated with Claude Code

video --first-frame and image --subject-ref hardcoded image/jpeg for
all local files. PNG/WebP files sent with wrong MIME could be rejected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@RyanLee-Dev RyanLee-Dev merged commit 2a40b30 into main Apr 6, 2026
2 checks passed
@RyanLee-Dev RyanLee-Dev deleted the fix/mime-type-detection branch April 8, 2026 21:44
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.

2 participants