Skip to main content

Upload with pre-signed Url

Overview


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

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

The description of the URL parameter is as follows:

projectId URL Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionProject specifier property. Format: pxxxxxxx

Request Body

{
"fileName": "video.mp4",
"mimeType": "video/mp4",
"contentType": "video/mp4",
"contentLength": 200
}

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": "https://vpplayer.tech/presigned-url?AWSAccessKeyId=some-secure-key",
"requestKey": "some-request-key"
},
"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
result.urlstringReturns the presigned url when you can upload a video
result.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
info

If the action is successful, the service responds with an HTTP 200 or 201 status code.

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: Service Unavailable