When uploading files to dropzone from mobile, ONLY ONE file gets processed

Viewed 579

I recently opened an issue on the Dropzone repo, but here is a summary of what happens.

If I go on the app on mobile to upload images and select Take a Photo or Video, only the last photo captured will be submitted to the server. If I take 3 photos, only the array submitted will only contain the LAST photo. The weird thing is, if I upload 3 photos from the library, it works perfectly.

Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("div#mydropzone",{
  url: "<%= request.base_url %>/uploadfiles",
  autoProcessQueue: false,
  uploadMultiple: true,
  addRemoveLinks:true,
  parallelUploads:10,
  init: function () {
    $('#myForm').submit(function(e){
      if (isFormValid()){
        if(myDropzone.getQueuedFiles().length > 0){
          e.preventDefault();
          console.log(myDropzone.files)
          document.getElementById('modal-main-text').innerText = myDropzone.files.length
          myDropzone.processQueue();
        }
      }
      else {
        return false;
      }
    });
  },
  ....other code...

One thing I know, is that before it hits the server... the console.log(myDropzone.files) dropzone does have the correct number of files.

0 Answers
Related