Skip to main content

Presigned URL to Upload File

Overview


The following table contains important information about the POST method in regards to the upload process with presigned url.

POST Method
MethodPOST
URL or Endpoint/api/projects/projectId/uploads/url
HeadersAuthorization
ParametersprojectId
BodyfileName, contentLength, mimeType, contentType

The description of the URL parameter is as follows:

projectId URL Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique identifier for project

Request Body

{
"fileName": "string",
"contentLength": 0,
"mimeType": "string",
"contentType": "string"
}

Information about the fields that appear when you request the body of the video are displayed in the table below.

Field NameMandatoryTypeDescription
fileNameYesstringName of the file.
mimeTypeYesstringType of the file.
contentTypeYesstringContent type of the file
contentLengthNointegerLength of the file (in bytes).

Response

{
"success": true,
"statusCode": 200,
"result": {
"url": "url",
"requestKey": "requestKey"
},
"resultInfo": null,
"errors": [],
"messages": [],
}

Information about the fields that appear when you request the body of the video are displayed in the table below.

Field NameTypeDescription
successboolIf the response is successful it will return true. Otherwise will return false
statusCodeintegerReturns the HTTP Status Code
resultarray[Object]Returns the response object
urlstringReturns the presigned url when you can upload a video
requestKeystringReturns the unique RequestKey
resultInfostringReturns extra information about the result
errorsarray[string]Indicates if there were problems with the request
messagesarray[string]Returns the response message from the encode endpoints

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed