title: Upload cropped image using cropper.js plugin and jQuery
body: <p>I use cropper.js to crop an image. Cropping and displaying works well.</p>
  
  <p>I now want to upload the image using jQuery's Ajax to the directory /uploads (the permissions are set correctly)</p>
  
  <p>Problem: The image is not uploaded, actually nothing happens.</p>
  
  <pre><code>croppedCanvas = $image.cropper('getCroppedCanvas', {
  width: 320,
  height: 320, 
    });
  
  croppedCanvas.toBlob(function (blob) {
      var form_data = new FormData();
      form_data.append('croppedCanvas', blob);
  
      $.ajax('upload.php', {
          type: "POST",
          data : form_data,
          contentType: false,
          cache: false,
          processData:false,
          mimeType:"multipart/form-data"
      }).done(function(res) {
          console.log('Upload success');
      });
  });'
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code>$.ajax('upload.php', {
      type: "POST",
  </code></pre>
  
  <p>I also tried to upload directly (like recommended on <a href="https://github.com/fengyuanchen/cropper" rel="nofollow noreferrer">https://github.com/fengyuanchen/cropper</a></p>
  
  <pre><code>$.ajax('/uploads', {
      type: "POST",
  </code></pre>
  
  <p>but neither the image is uploaded nor my php-script "upload.php" is executed.</p>
  
  <p>However, the console says "Upload success"</p>