API Method: /api/photo/replace
Replace a photo, replace a video or update the thumbnail of a video.
Parameters
Parameter | Description |
---|---|
photo_id (required) | The photo or video to replace. |
file | The photo file to replace a photo with, or to use as a thumbnail for a video. |
time | When replacing the thumbnail of a video, you can extract the thumb from a specific part of the video (i.e. 40.2). Also, have a look at /api/photo/frame. |
crop_p | Specify whether or not to crop the uploaded photo to fit the size of the existing photo or video. |
Permission level
The minimum required permission level is:
write
Example XML Response
<response status="ok" permission_level="wrte"
message="The photo was successfully replaced" cached="0">
<photo_id>60281</photo_id>
<tree_id>7340</tree_id>
<token>7aguzmVuqpwjshwprfegm2swfdcnaWrj</token>
</response>
Example JSON Response
{
"status": "ok",
"message":"The photo was successfully replaced",
"permission_level":"write",
"cached":"0",
"photo":{"photo_id": "60433", "tree_id": "7340",
"token": "7aguzmVuqpwjshwprfegm2swfdcnaWrj"},
"p": "1",
"size": "1",
"site": { ...},
"endpoint": "/api/photo/replace"
}