v2 - Media

Confirm upload completion

Call this after successfully uploading the file to GCS.

This will:
1. Validate the Media exists and is in 'uploading' status
2. Make the file publicly accessible
3. Extract video metadata (width, height, fps, codec, etc.) for Smart Tags
4. Update Media status to 'ready'
5. Return the complete Media with public URL and video_metadata
post/v2/media/{media_id}/upload/complete

Request

  • Base URL
    https://api.jubjubapp.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Path parameters

media_idstring required

Headers

Authorizationstring
X-JubJub-Service-Keystring
X-JubJub-Agent-Keystring
X-JubJub-Platform-Keystring
Originstring
Refererstring
X-JubJub-Trial-Tokenstring

Request body

size_bytesinteger required

Final file size in bytes (frontend knows this after upload).

Response

Successful Response

media_idstring required
workspace_idstring required
typestring required

Media type: video, image, subtitle or document (a PDF)

filenamestring required
content_typestring required
size_bytesinteger required
duration_secondsnumber nullable

Duration in seconds (for videos)

statusstring required

Processing status: uploading, processing, ready, failed, unreadable. unreadable is terminal: the bytes are not a usable file of their type, the stored object has been deleted, and re-uploading the same file will not help.

status_reasonstring nullable

Why, in plain words, when the status needs explaining. Set with unreadable; null otherwise. Safe to show to the person.

urlstring nullable

Signed URL of the file, valid for 120 minutes (when status is 'ready'). A document's URL opens inline as application/pdf. An image's URL is the original only for its uploader; everyone else gets a copy with EXIF (GPS included) removed, and null when that copy could not be made.

created_atstring date-time required
updated_atstring date-time nullable

Changes

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