title: dropzone js onclick submit file upload
body: <p>upload all files with a single button click.<br>
  HTML:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;button id="submit-all"&gt;Submit all files&lt;/button&gt;
  &lt;form action="/target" class="dropzone" id="my-dropzone"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre class="lang-js prettyprint-override"><code>Dropzone.options.myDropzone = {
  
    // Prevents Dropzone from uploading dropped files immediately
    autoProcessQueue: false,
  
    init: function() {
      var submitButton = document.querySelector("#submit-all")
          myDropzone = this; // closure
  
      submitButton.addEventListener("click", function() {
        myDropzone.processQueue(); // Tell Dropzone to process all queued files.
      });
  
      // You might want to show the submit button only when 
      // files are dropped here:
      this.on("addedfile", function() {
        // Show submit button here and/or inform user to click it.
      });
  
    }
  };
  </code></pre>
  
  <p>But the file is upload after drag and drop..</p>