title: Dropzone.js - remove preview file if upload fails
body: <p>I have a problem with my dropzone,</p>
  
  <pre><code>$(".js-example-basic-multiple").select2();
  Dropzone.options.dropZone = {
      //options here
      maxFilesize: 2,
      addRemoveLinks: true,
      removedfile: function(file) {
          var name = file.name;        
          $.ajax({
          type: 'POST',
          url: host+'upload/unfile',
          data: "id="+name,
          dataType: 'html'
          });
          var _ref;
          return (_ref = file.previewElement) != null ? _ref.parentNode.removeChild(file.previewElement) : void 0;        
  
          //console.log();
      },
      init: function() {
          this.on("maxfilesexceeded", function(file){
              alert("No more files please!");
          });
      }
  }
  </code></pre>
  
  <p>My problem is, when a file fails to upload, it still shows the preview images, so i need that file to be removed automatically when these file fails to upload, how can I do that??</p>