Items‎ > ‎

bluemelon.items.uploadFromURL

uploads a picture from the URL specified and if set : assigns it to a album and assigns a title, a description and tags thereto - the file size must not exceed 100 MB. The response indicates that the upload has been accepted for processing - the actual result is stored in the user's My Stuff >> Activity Log

Authentication:

Yes (see here for details)

Arguments:

(required) string : address - the URL of the picture to be uploaded - including the protocol (such as "http://")
(optional) string : filename - the filename for the server - if not specified the filename is extracted from the address string
(optional) long : albumid - the id of the album the picture is to be assigned to
(optional) long : filecreateddate - the file creation time in milliseconds since 00:00:00 GMT, Jan 1, 1970
(optional) long : filemodifieddate - the file last modification time in milliseconds since 00:00:00 GMT, Jan 1, 1970
(optional) string : accessmode - the access mode for the picture - ignored unless the string equals "private", "public", or "unlisted"
(optional) string : title - a title of the picture
(optional) string : description - a description of the picture
(optional) string : tags - a set of tags to be assigned to the picture
(optional) string : lat - the latitude - the valid range is from -90 to 90 ( ignored unless "lng" is set as well )
(optional) string : lng - the longitude - the valid range is from -180 to 180 ( ignored unless "lat" is set as well )
(optional) integer : accuracy - the accuracy - a value in the range form 1 to 19 ( ignored if either "lat" or "lng" is not set )
(required) string : publickey - the public key of an application
(required) string : token - the access token

Request Example:

http://www.bluemelon.com/api/rest/{api_sing}/
?method=bluemelon.items.uploadfromurl&address=http%3A//www.domain.com/img.jpg&title=My%20Photo&publickey={publickey}&token={token}

Response Example:

<rsp status="ok" onrequest="bluemelon.items.uploadfromurl" /> 

Error Codes:

4 - "Missing parameter"
5 - "Invalid parameter"
7 - "Album not found"
14 - "Invalid accessToken"
16 - "Access token timed out.You must relogin."
17 - "Invalid call signature size"
18 - "Invalid call signature"
20 - "Missing api_sign"
29 - "Invalid address parameter"
103 - "Unknown error"
121 - "Incorrect values of X-BlueMelon-FileCreatedDate, X-BlueMelon-FileModifiedDate"
150 - "Invalid filename"
600 - "No write permissions"
603 - "Account recently expired or deleted"

Comments