Streaming upload
Send the raw bytes as the request body with the file’s ownContent-Type. Not
multipart, not base64 — the bytes themselves.
Response
handle object — both fields — in uploadedHandles when you
create the post:
preview.r2Url is a real URL you can show in a composer before the post exists.
It is a staging location, not the published permalink.
Inline base64
For small images, skip the upload round trip:data:image/jpeg;base64, prefix.
Carousels
Order is the order you supply. Sources are concatenated asuploadedHandles then mediaItems, so don’t split one carousel across both
unless you want that ordering.
Video covers
PasscoverImage to choose a video’s thumbnail. Same base64 shape as
mediaItems:
Validation
Media is checked against the target platform andmediaType before the post
is accepted — dimensions, duration, file size, and count. A rejection comes back
as 400 naming the offending item:
Removing media from a post
While a post is still editable, drop one item without touching the rest:mediaId comes from the media[] array on the post. This deletes the stored
blob as well as the row.