POSTing canvas toDataURL to POST account/update_profile_image


#1

I’m trying to upload the canvas.toDataURL result to the profile image with the example made by Matt Harris with tmhOAuth (link below), but I doubt how it has to be sent.

toDataURL returns a string like this “data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAA…”. I’m trying to put it on the Image parameter, but I get the json response “Something is technically wrong.”. Any clues?

Links:
· https://github.com/themattharris/tmhOAuth/blob/master/examples/images.php
· http://www.w3.org/TR/html5/the-canvas-element.html#dom-canvas-todataurl


#2

edit: I’m using the url "1/account/update_profile_image"
edit2: I just read in the API Status “Profile Image and Background Image Uploads may return a 500 error for certain user accounts.”. I’ll check back later, but if you think sending the dataURL wont work, please tell me.

Thanks for your time :slight_smile:


#3

Dudes, I solved this, please remove the question.


#4

how you solved this? please give us an answer


#5

It would be nice if you can tell what was wrong with your first attempt.


#6

como se resuelve


#7

I could solve it by using only using base64_encoded string. No need to use any other meta information.


#8

#9

#10

#11