title: how to upload image by using dropzone.js
body: <p>I would like to use <code>dropzone</code> plugin to upload image or images.
  but it doesn't upload images :</p>
  
  <pre><code>                    &lt;form enctype="multipart/form-data" id="my-awesome-dropzone" class="dropzone dz-clickable" action="http://www.****/Upload.php"&gt;
                          &lt;div class="dropzone-previews"&gt;&lt;/div&gt;
                          &lt;button type="submit" class="btn btn-primary pull-left"&gt;Submit&lt;/button&gt;
                          &lt;div class="dz-default dz-message"&gt;&lt;span&gt;Drop files here to upload&lt;/span&gt;&lt;/div&gt;&lt;/form&gt;
                      &lt;div&gt;
  </code></pre>
  
  <p>my script :</p>
  
  <pre><code>$(document).ready(function(){
  
      Dropzone.options.myAwesomeDropzone = {
  
          autoProcessQueue: false,
          uploadMultiple: true,
          parallelUploads: 100,
          maxFiles: 100,
          url:'http://****/Upload.php',
          // Dropzone settings
          init: function() {
              var myDropzone = this;
  
              this.element.querySelector("button[type=submit]").addEventListener("click", function(e) {
                  e.preventDefault();
                  e.stopPropagation();
                  myDropzone.processQueue();
              });
              this.on("sendingmultiple", function() {
                  console.log('sending');
              });
              this.on("successmultiple", function(files, response) {
                  console.log('success:'+response);
                  this.options.url = 'http://www.***/Upload.php';
              });
              this.on("errormultiple", function(files, response) {
                  console.log('error:'+response);
              });
          }
  
      }
  
  });
  </code></pre>
  
  <p>on my console I got this response:</p>
  
  <p><a href="https://i.stack.imgur.com/Fcohq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fcohq.png" alt="enter image description here"></a></p>