Solution to not being able to upload profile picture

Hello everyone, if you, like me have been trying to upload a new profile picture to your Arduino account and have faced the error "FAILED TO UPLOAD AVATAR" you will be glad to know that there is a solution/workaround.

For the ones that just want the solution: Set a URL, even if it is a random one as long as it meets has https://{domain}.{tdl} put https://google.com if you want. When you save it, you will be able to upload your image properly.

Now, to the developers of the Arduino website, here is the reasoning behind the bug/design.

When trying to upload an image without a website set in your profile you get the following response:
PUT https://api2.arduino.cc/users/v1/users/byID/me/public 400 (Bad Request)

{
"name": "BadRequest",
"id": {requestID},
"message": "the given website url is not valid",
"temporary": false,
"timeout": false,
"fault": false
}

So I took a look into the payload sent to the PUT request and there it was the payload did not have the website property set and therefore the request was being returned as a bad request.

{
"avatar": "https://content.arduino.cc/avatars/3/thefallender.png",
"bio": "Sup",
"website": "",
"avatar_data": {longStringOfImageData}
}

I would also like to note that the PUT request for removing the website URL gets the same response, forbidding the user from removing the URL from their profile, so with this workaround a lot of people will have random urls set in their profile without being able to remove them.

Happy coding.

Edit1: Thanks to the moderator that unmarked the post as spam.

Edit2: I do not know if it linking this post to other posts with the same issue would be an issue. For now I will refrain from doing that as it could be flagged as spam.

3 Likes

Hi @TheFallender. Thanks so much for sharing your findings

It is fine by me.

The automated systems work in mysterious ways, but human moderators review every action it takes and set it to rights fairly quickly if the robot went off the rails.

I have been tracking this issue. Here are the reports I am aware of:

1 Like

Hello @pert, thank you for the reply. I will check the listed posts and see if I can find any extra post with the same issue.

Many thanks @TheFallender , your solution worked for me!

I have that problem, plus I was being prevented from putting anything new in my profile area, as it wouldn't save. I will try your profile pic solution, with thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.