uploadPhoto
- Home
- Multimedia
- UgcPhoto
- uploadPhoto
uploadPhoto
Handles the uploading of photos. The “file” method requires the photo to be passed via POST with multipart/form-data.
Parameters
Name | Description |
optional | |
userID required | The user’s primary identifier. |
blogID optional | The primary identifier for the user or group’s site. (Same as siteID) |
method optional | Used when doing content uploads. Can be file, url, or path. |
url optional | The url of the photo |
path optional | The path of the photo |
caption optional | The caption of the photo |
imageOrientation optional | Used to rotate a photo. Options: rotateLeft, rotateRight, or rotate180 |
setAsAvatar optional | If true, the newly uploaded photo is set to the user’s avatar. |
output optional | The response output format. Accepts JSON and XML. |
Request Syntax
https://services.onesite.com/rest/ugcPhoto?action=uploadPhoto&userID=229928503&nodeID=188234&url=https://images.onesite.com/onesite.com/topNav/logoBuckleSelfShadow.png&caption=Cool+Logo%21&method=url&devkey=[devkey] |
JSON Response
1 2 3 4 5 6 7 8 9 |
{ "service":"ugcPhoto", "action":"uploadPhoto", "code":1, "item":{ "photo_id":160546016 }, "message":"Photo Successfully Uploaded" } |
Service Information
Service | ugcPhoto |
Method | uploadPhoto |
Type | REST |
Response Types | JSON, XML |