Snapvisor Docs

Finalize a media upload

Confirm that a media version's bytes have been uploaded. Snapvisor reads the object back to check the file is what it claims to be, records an image's dimensions, bills it to the screenshot meter, and updates the managed pull request comment. There is no processing step: the media is usable the moment this returns. Use it right after uploading the file to the target returned by createMedia.

POST
/media/{mediaId}/finalize

Confirm that a media version's bytes have been uploaded. Snapvisor reads the object back to check the file is what it claims to be, records an image's dimensions, bills it to the screenshot meter, and updates the managed pull request comment. There is no processing step: the media is usable the moment this returns. Use it right after uploading the file to the target returned by createMedia.

Authorization

AuthorizationBearer <token>

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Snapvisor project settings. Project tokens are used by CI and the SDK to create builds and deployments.

In: header

Path Parameters

mediaId*string

The media ID

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/media/string/finalize"
{  "id": "string",  "name": "string",  "state": "before",  "description": "string",  "stage": "staged",  "branch": "string",  "prNumber": 0,  "url": "http://example.com",  "markdown": "string",  "version": 0,  "versionCount": 0,  "fileUrl": "http://example.com",  "posterUrl": "http://example.com",  "contentType": "string",  "sizeBytes": 0,  "width": 0,  "height": 0,  "visibility": "team",  "status": "pending",  "expiresAt": "string",  "createdAt": "string"}