Can't set my avatar

Every time I try to upload an avatar I get this message:

"There has been an error in the upload. Please ensure that the file has been correctly selected and that the upload has taken place successfully."

I can't even upload the image I used before, so it's not a problem with the new image I'm trying to upload.