Skip to main content

Chunk Upload Media Complete

This endpoint completes the chunk upload and create the Media

info

This operation requires authentication

HTTP Request

POST /api/v2/media/upload/complete/

Parameters

NameInTypeRequiredDescription
» typebodystringfalseDefault to image or document based on file extension
» upload_idbodystringtrueId of the chunk uploaded file
» md5bodystringtrueMD5 hash of the original file for checksum proposal

Enumerated Values

ParameterValueDescription
» typeimageImage media type
» typedocDocument media type (only pdf documents are supported)
» typeeimageOther images related to contributes. eg. Images uploaded and inserted as <img> into the contribute text

Example Body Parameters

{
"type": "image",
"upload_id": "string",
"md5": "string"
}

Example Request

const inputBody = '{
"type": "image",
"upload_id": "string",
"md5": "string"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

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

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codeMedia

Example responses

{
"id": "integer",
"added_at": "string",
"type": "string",
"title": "string",
"description": "string",
"url": "string(uri)",
"image": "string",
"image_width": "integer",
"image_height": "integer",
"order": "integer",
"embed": {Embed}
}