You are here: Photobucket API Help > Methods > Group Albums > Upload Media to a Group Album

Upload Media to a Group Album

Upload media to a group album.

User Login Required

Yes. See End-User Authentication for details.

HTTP Method

POST

REST Path

/group/[identifier]/upload

See Object Identifiers for an [identifier] explanation.

Parameters

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:

  • Image – jpg, png, gif, base 64 encoded image, or bmp.
  • Video –3g2, 3gp, 3gp2, 3gpp, 3p, asf, avi, divx, dv, dvx, flv, gif, moov, mov, mp4, mpeg4, mpg4, mpe, mpeg, mpg, qt, swf, wmv, xvid, rm.

Notes:

  • If the type is base64, this is a regular www-urlencoded-data field with the base64 binary.
  • Base64 incurs the limits of the size of a post, so be aware that larger files cannot be uploaded this way.
  • Neither the uploadfile parameter nor the contents should be included in the OAuth base string, which is used to sign upload requests.
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)

  • 100 => 100x75
  • 160 => 160x120
  • 320 => 320x240
  • 640 => 640x480
  • 800 => 800x600
  • 1024 => 1024x768
  • 1280 => 1280x960, //premium owner only
  • 1600 => 1600x1200, //premium owner only
  • 2048 => 2048x1536, //premium owner only
  • 2592 => 2592x1944, //premium owner only
  • 3648 => 3648x2736, //premium owner only
  • 4000 =>4000x3000, //premium owner only
Integer

Request Example

The request uploads the image "image1-17.gif" to the "FOYJ8ZK56" album.

POST http://api123.photobucket.com/group/FOYJ8ZK56/upload

Post Form

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

Response Example

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&current=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>

Error Codes

For a full list of possible errors, see Error Codes.

 

Published 25-June-10. See developer.photobucket.com for additional resources.