POSTing canvas toDataURL to POST account/update_profile_image


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?



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:


Dudes, I solved this, please remove the question.


how you solved this? please give us an answer


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


como se resuelve


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