formData.append('avatar', blob, 'avatar.jpg');
$.ajax('upload_photo.php', {
method: 'POST',
data: formData,
processData: false,
contentType: false,
<?php
$file_to_upload = $_FILES['croppedImage']['tmp_name'];
$file_name = 'avatar.jpg';
move_uploaded_file($file_to_upload, $file_name);
?>