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
Name | In | Type | Required | Description |
---|---|---|---|---|
file | body | image | true | The file to upload |
parentuuid | body | string | true | The parent file uuid. It has to be the file_uuid returned by the previous call |
filetype | body | string | false | The type of the file to upload |
filename | body | string | false | The name of the file to upload |
totalfilesize | body | integer | false | The size of the file to upload |
md5 | body | string | false | The MD5 of the file to upload |
Example Body Parameters
- JSON
{
file: "image",
parentuuid: "string"
}
Example Request
- JavaScript
- Bash
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);
});
# You can also use wget
curl -X POST /api/v2/pm/upload/ \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
file_url | string | false | none | The file url |
file_uuid | string | false | read-only | The file id |
parent_file_uuid | string | false | read-only | The parent file id |
Example responses
- 200
{
"file_url": "string",
"file_uuid": "string",
"parent_file_uuid": "string"
}