Photoset creation, v2 API from ruby

48 views
Skip to first unread message

sri...@poshmark.com

unread,
Oct 19, 2017, 2:55:05 AM10/19/17
to Tumblr API Discussion
Hi, 

I am having trouble creating photoset, 

Here are the things i've tried putting in the payload. 

POST request body :

1. 
body['source[0]'] = "<img url>"
body['source[1]'] = "<img url2>"

This doesn't work as i later found out if you want a photoset you have to pass the images though the data field.


2. So, i tried:

body["data[0]"] = URI::encode(open(picture_url).read)

body["data[0]"] = open(picture_url).read

body["data"] = [open(picture_url).read,open(picture_url_2).read

Also i tried to save the file locally and pass the file object in the body

None of the above methods worked, and i get the following error : 

Nice image, but we don't support that format. Try resaving it as a gif, jpg, or png.


Reply all
Reply to author
Forward
0 new messages