Uploading avatar using ajax