title: Dropzone check if files names exists before processing queue
body: <p>I am using dropzone for uploading files which I save with some meta data in a database in the backend.
  When a user tries to upload a bulk of files I want to check if he has already uploaded a file with this name and warn him with an alert with an option to continue ot stop.</p>
  
  <p>So I disabled the <code>autoProcessQueue</code>.
  I am also listening for <code>addedfile</code> event, I get the name, I perform an ajax to check if it exists in the database and return true or false, good.</p>
  
  <p>Let's say the user tries to upload 40 files which all already exist, I don't want 40 warnings that this file already exists, I want one notification printing all 40 filenames.
  I was looking for <code>addedfile</code> but for multiple files, I didn't found a solution.</p>
  
  <p>Here is my code for now
  This is where I'm stuck
  How can I know when I've checked every file ?</p>
  
  <pre><code>$(document).ready(function() {
          @if(isset($checkRoute))
              function filenameExists(name) {
                  $.ajax({
                      type: 'GET',
                      url: '{{ $checkRoute }}',
                      data: {
                          name: name
                      }
                  })
                  .done(function(res) {
                      // returns true or false
                      return res
                  })
                  .fail(function(err) {
                      console.log(err)
                  })
              }
          @endif
  
          let existingFilenames = []
  
          let fileCount = 0
  
          $('#{{ $element_id }}').dropzone({
              url: "{{ $upload }}", // Set the url for your upload script location
              paramName: "documents", // The name that will be used to transfer the file
              maxFiles: 100,
              maxFilesize: 100, // MB
              parallelUploads: 100,
              timeout: 240000,
              addRemoveLinks: true,
              acceptedFiles: "application/msword, application/vnd.ms-excel, application/pdf, image/*, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, image/*",
              uploadMultiple: true,
              headers: {
                  'X-CSRF-TOKEN': "{{ csrf_token() }}"
              },
              init: function() {
                  @if(isset($checkRoute))
                      this.on('addedfile', function(file) {
                          console.log(this.getAcceptedFiles())
                          fileCount++
                          if (filenameExists(file.name)) {
                              console.log(file.name)
                              existingFilenames.push(file.name)
                          }
                      })
                  @endif
              },
              autoProcessQueue: false,
              sendingmultiple: function (files) {
                  // Begin loading
                  KTApp.blockPage({
                      overlayColor: '#000000',
                      type: 'v2',
                      state: 'success',
                      message: '{{ __('documents_uploading') }}'
                  });
              },
              queuecomplete: function () {
                  // End loading
                  KTApp.unblockPage();
  
                  $.notify({
                      // options
                      message: '{{ __('documents_upload_success') }}'
                  }, {
                      // settings
                      type: 'success',
                      placement: {
                          from: "top",
                          align: "center"
                      },
                      animate: {
                          enter: 'animated fadeInDown',
                          exit: 'animated fadeOutUp'
                      },
                  });
  
                  window.location.replace("{{ $redirect }}");
              }
          });
      });
  </code></pre>
  
  <p>Another thing that concerns me is how will I process the queue at the press of the button in the notification.</p>