Skip to main content

Upload a Thumbnail

This endpoint uploads a thumbnail.

info

This operation requires authentication.

info

This endpoint always follows Upload a Media or Upload a Media in Chunks.

HTTP Request

POST /api/v2/pm/upload/

Parameters

NameInTypeRequiredDescription
filebodyimagetrueThe file to upload
parentuuidbodystringtrueThe parent file uuid. It has to be the file_uuid returned by the previous call
filetypebodystringfalseThe type of the file to upload
filenamebodystringfalseThe name of the file to upload
totalfilesizebodyintegerfalseThe size of the file to upload
md5bodystringfalseThe MD5 of the file to upload

Example Body Parameters

{
file: "image",
parentuuid: "string"
}

Example Request

const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/pm/upload/',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
file_urlstringfalsenoneThe file url
file_uuidstringfalseread-onlyThe file id
parent_file_uuidstringfalseread-onlyThe parent file id

Example responses

{
"file_url": "string",
"file_uuid": "string",
"parent_file_uuid": "string"
}