7

I am using jquery file upload. I use it for several pages in a project. For one project I need to upload all the files in one request because I loop trough all the images and after that, a dossier is created and closed. I think it's faster to send all the images at once instead of changing the server side handler. Only thing is, I can't get them together. I founded the option singleFileUploads, this works, but only if you select all the files at once. If drag and drop 2 times, it still uploads in 2 posts (and it makes 2 dossiers.

I have read the documentation (https://github.com/blueimp/jQuery-File-Upload), but can't find out how to get it work. (i know that this is a plugin specially made for multiple posts)

So basically my question is, does anyone know how to get the inserted files before uploading so i can group them and serialize them.

Thnx,

SynozeN Technologies
  • 1,337
  • 1
  • 14
  • 19
user1664803
  • 293
  • 1
  • 7
  • 22
  • Could you find a solution for this? I'm hit with same problem. – A.R.K.S Aug 13 '15 at 00:06
  • I faced the same issue and how I worked around it is [here][1]. [1]: http://stackoverflow.com/questions/31955786/how-to-make-jquery-file-upload-plugin-call-backend-only-once-for-all-the-files-i/32033328#32033328 – A.R.K.S Aug 17 '15 at 06:33

2 Answers2

0

This post might help you:

Multiple File Upload Input

Unfortunately, it does not support IE. But there is still a Flash-based plugin (free) can do that, of course it also supports multi browsers.

Check it out: Demos - Uploadify

Quan Nguyen
  • 562
  • 1
  • 5
  • 20
0

You can upload your files during form submit.

 var submitFormData = true;  
$('#fileFieldId').fileupload({
   dataType : 'json',
   autoUpload : false,
   add : function(e, imageData){
      $("#yourFormId").on("subimt",function(){
          if(sendData){
              imageData.formData = $("#yourFormId").serializeArray();              
              submitFormData = false;
          }

          imageData.submit();
      });
   },
   done: function(e,data){
       submitFormData = true;
   }
});
Bibek Sharma
  • 3,210
  • 6
  • 42
  • 64