Upload a new file to the site.
| Parameter | Description |
|---|---|
| file (required) | The file to upload. (Note that this parameter − neither the filename nor the file content − shouldn't be included in the api signature). |
| user_id | The user's ID. If no user ID is given, the objects will be uploaded anonymously. Requires super, otherwise files are uploaded using the authenticated user. |
| album_id | A album (or channel) ID. |
| title | A title for the upload. All HTML tags will be stripped away from the title. |
| description | A description of upload. The value can include save HTML tags such as <b> or <p>; however, if any disallowed tags are included, all html with be stripped from the description. |
| tags | Space-separated list of tags to attach to the uploaded file. |
| publish | Should the file be published in the site immediately? Default is 1 (0 or 1) |
| publish_date | Specific publish date of the photo or video, either past or future. |
| absolute_url | If the uploaded photo or video is to be associated with a different canonical URI from the on assigned by default, set it here. |
In addition to the standard parameters, any custom variable configured for photo objects can be set using the variable key as a parameter.
The minimum required permission level is:
write
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok" permission_level="write"
message="The file was successfully uploaded" cached="0">
<photo_id>60432</photo_id>
<tree_id>7340</tree_id>
<token>7aguzmVuqpwjshwprfegm2swfdcnaWrj</token>
</response>
{
"status": "ok",
"message":"The file was successfully uploaded",
"permission_level":"write",
"cached":"0",
"upload":{"photo_id": "60433", "tree_id": "7340",
"token": "7aguzmVuqpwjshwprfegm2swfdcnaWrj"},
"p": "1",
"size": "1",
"site": { ...},
"endpoint": "/api/photo/upload"
}
Me and my colleagues at 23 believe in 100% Human support. Yup, no autoresponders or 3 days response policy. The easiest way to get a feeling of our product is to schedule a demo with me below. If you want to reach me via phone, you can simply call me on +45 31-23-45-81 or Skype me via kikecuellar. Have a great day!