Upload image with Tumblr API in PHP
- by John
I'm having trouble uploading a photo from my computer to tumblr using their API.
http://www.tumblr.com/docs/en/api
photo - Requires either source or data, but not both. If both are specified, source is used.
* source - The URL of the photo to copy. This must be a web-accessible URL, not a local file or intranet location.
* data - An image file. See File uploads below.
* caption (optional, HTML allowed)
* click-through-url (optional)
I need to use data
File uploads can be done in a data parameter where specified above. You may use either of the common encoding methods:
multipart/form-data method, like a file upload box in a web form. Maximum size:
o 50 MB for videos
o 10 MB for photos
o 10 MB for audio
I would post my code but it's not showing up correctly for me.