Can't POST an image through REST API , please help
Hi, I am using the REST API and I am able to get everything to work, including posting notes. However when I try to post an image I always get a 400 response with "Something went wrong".
I am using CURL via PHP to post an image file. I have pushed files to other API's before however it doesn't seem to work for Brightkite.
Any help would be appreciated as I want to get Brightkite integrated with our service.
Thanks!
I am using CURL via PHP to post an image file. I have pushed files to other API's before however it doesn't seem to work for Brightkite.
Any help would be appreciated as I want to get Brightkite integrated with our service.
Thanks!
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
-
Inappropriate?Hi Steven, thank you for bringing this to our attention. We are looking into the problem.
-
Inappropriate?No problem, Please let me know asap, as I wanna get the integration going with our service. Worst case I'll post a note with a link to the image, but I'd rather post the image itself :-D
I’m a bit happier
-
Inappropriate?After looking at the logs a bit I think the problem you are experiencing may be caused by the field names you are using. The photo file should be attached to `photo[photo]` and the caption to `photo[body]`. For example, to post a photo with curl you can use this command
curl --anyauth --user pezra \
--form photo[photo]=@/home/pezra/Desktop/Photo-0058.jpg \
--form 'photo[body]=Testing photo posting' \
http://brightkite.com/places/356a192b...
Let us know if that solves your problem.
-
Inappropriate?Solved! Yeah, the documentation doesn't make that clear at all.
Thanks a bunch, but I would advise making that clear for future users.
I’m in a kick-ass mood
Loading Profile...




EMPLOYEE
EMPLOYEE
