Can't upload avatar on localhost

I’m getting a POST 500 error in the console after trying to upload the avatar.

When clicking the link it shows “Invalid Panel URL” error like so:

Does the assets/avatars/ folder exist?

Yes it does, I was looking around the forum if anyone had this problem and I found the post with missing avatars folder, but I do have the folder there.

Go to the Network tab on Chrome Dev Tools then click on the failed request, you should see a preview of the response on the right side which may include the error message.

You are right, I forgot about that. Here it is:

{status: "error", code: 0, message: "You can only upload JPG, PNG and GIF files"}
message:"You can only upload JPG, PNG and GIF files"

And yes, I’m uploading a png file.

Are you on a Windows system?

Yes I am. Using latest XAMPP and PHP 7.1

Avatar uploads do not work on Windows. You will have to upload the avatar manually to the avatars folder. It will work on your production server (Unix-y system).

Oh, I see, didn’t know about that sorry. Well then problem solved (kind of)

Unfortunately, this is a problem with the Apache configuration on Windows, where mime-type detection does not work as it should. But better check if it works for you on production.

Yea I understand. I actually tried a clean test install on a server and uploading avatars works there so it should be okay.