Skip to main content
POST
Finish uploading a media file

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

application/json
media_id
string<uuid>
required

The media_id from media-upload-start.

Minimum string length: 1
width
integer

Width in pixels of an image or video.

Required range: x > 0
Example:

1600

height
integer

Height in pixels of an image or video.

Required range: x > 0
Example:

900

duration_seconds
number

Length of a video or audio file in seconds.

Required range: x >= 0
Example:

42.5

poster_url
string

Still image shown before a video plays: the url of an image in this company's library.

Response

The file is ready to use.

file
object
required
replaced
boolean
required

True when this call swapped in a new version of an existing file. False on a new file, and when no replacement was waiting (a repeated call, or an upload that never arrived).

drafts_updated
integer
required

Page drafts moved to the new address when a file was replaced. Published pages keep the old address until they are published again.

warnings
string[]
required

Things worth telling the person. The file was accepted.