Upload media to a group album.
Yes. See End-User Authentication for details.
POST
/group/[identifier]/upload
See Object Identifiers for an [identifier] explanation.
| Parameter | Optional | Default | Description | Variable |
|---|---|---|---|---|
| identifier | N | Album identifier. | String | |
| type | N | image | Media type. Options are image, video, or base64. | String |
| uploadfile | N, unless URL. |
Media encoded with multipart/form-data. Acceptable file types are:
Notes:
|
String | |
| title | Y | Searchable title to set on the media. Maximum 250 characters. | String | |
| description | Y | Searchable description to set on the media. Maximum 2048 characters. | String | |
| filename | Y | blank | File name to set on the media. If left blank, the file name matches the original name. Valid characters are letters, numbers, underscore ( _ ), hyphen (-), and space. | String |
| scramble | Y | false | Indicates if the filename should be scrambled. Options are true or false. | Boolean |
| degrees | Y | Degrees of rotation in 90 degree increments. | String | |
| size | Y |
Size to resize an image to. (Images can only be made smaller.) One of: (value => resize result dimensions)
|
Integer |
The request uploads the image "image1-17.gif" to the "FOYJ8ZK56" album.
POST http://api123.photobucket.com/group/FOYJ8ZK56/upload
POST http://api123.photobucket.com/group/FOYJ8ZK56/upload
Content-Length: 3047 Content-Type: multipart/form-data; boundary=xYzZY
--xYzZY
Content-Disposition: form-data; name="type" image
--xYzZY
Content-Disposition: form-data; name="title" My logo
--xYzZY
Content-Disposition: form-data; name="description" Logo of PB
--xYzZY
Content-Disposition: form-data; name="uploadfile"; filename="image1-17.gif" Content-Type: image/gif
<encoded image data>
--xYzZY
Content-Disposition: form-data; name="scramble" false
--xYzZY
Content-Disposition: form-data; name="format" xml
--xYzZY
The successful response looks similar to:
<response>
<status>OK</status>
<content description_id="" name="image1-17.gif" public="" type="image" uploaddate="1214504395" username="pbapi">
<browseurl>http://gs123.photobucket.com/groups/jj225/FOYJ8ZK56/?action=view¤t=image1-17.gif</browseurl>
<url>http://gi123.photobucket.com/groups/jj225/FOYJ8ZK56/image1-17.gif</url>
<thumb>http://gi123.photobucket.com/groups/jj225/FOYJ8ZK56/th_image1-17.gif</thumb>
<description />
<title />
</content>
<format>xml</format>
<method>POST</method>
<timestamp>1214504394</timestamp>
</response>
For a full list of possible errors, see Error Codes.
| Published 25-June-10. See developer.photobucket.com for additional resources. |