Skip to content

Extract content media for syndication with video support

Created by: jedmund

Summary

  • Parse TipTap JSON content body for image and video nodes instead of using post attachments
  • Featured image takes priority, then content images (up to 4 total)
  • Bluesky video upload via uploadVideo API with job status polling and 60s timeout
  • Mastodon video upload via /api/v2/media (handles video natively)
  • Generalized Mastodon uploadMedia to detect content type for proper file extensions
  • Videos take priority over images on Bluesky (only 1 video allowed, can't mix)

Test plan

  • Create a post with an inline image → publish → verify image appears in Bluesky/Mastodon posts
  • Create a post with a video block → publish → verify video uploads to both platforms
  • Create a post with both images and video → verify Bluesky uses video embed, Mastodon includes all media
  • Create a post with 5+ images in content → verify only first 4 are included
  • Verify graceful fallback: if video upload fails on Bluesky, images are used instead

Merge request reports

Loading