Media

Declare a file and get upload instructions

Either sizeBytes for a direct upload (signed URLs come back: one PUT, or one per part for files over 16 MB) or sourceUrl for the server to fetch. Scope media:write. Up to 60 a minute.

post/media

Request

  • Base URL: https://preflight.social/v1
  • URL: https://preflight.social/v1/media
  • Auth: HTTP bearer

Request body

kind'image' | 'video'
mimeTypestring
sizeBytesinteger

Exact size; required for a direct upload.

fileNamestring
durationSecondsnumber

Measured by the client; lets a dry run warn about length limits.

fpsnumber
widthinteger
heightinteger
sourceUrlstring uri

A public https URL the server fetches instead of an upload.

Example request

{
  "mimeType": "video/mp4"
}

Response

The record and where to put the bytes.

Changes

No recorded changes to this operation across all 1 revision of this API.