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 | |
---|---|
Method | POST |
URL or Endpoint | /api/projects/projectId /uploads/url |
Headers | Authorization |
Parameters | projectId |
Body | fileName, contentLength, mimeType, contentType |
The description of the URL parameter is as follows:
projectId URL Parameter | |
---|---|
URL Parameter Name | projectId |
Mandatory | Yes |
Type | string |
Description | Unique 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 Name | Mandatory | Type | Description |
---|---|---|---|
fileName | Yes | string | Name of the file. |
mimeType | Yes | string | Type of the file. |
contentType | Yes | string | Content type of the file |
contentLength | No | integer | Length 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 Name | Type | Description |
---|---|---|
success | bool | If the response is successful it will return true. Otherwise will return false |
statusCode | integer | Returns the HTTP Status Code |
result | array[Object] | Returns the response object |
url | string | Returns the presigned url when you can upload a video |
requestKey | string | Returns the unique RequestKey |
resultInfo | string | Returns extra information about the result |
errors | array[string] | Indicates if there were problems with the request |
messages | array[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