change the method to upload the avatar