Thursday, 15 October 2020

how to skip file from current upload queue at run time with blueimp fileupload

Hi i have problem in skipping file from current upload queue.

my current scenario

  1. i want to abort 2nd file when it starts uploading , so that it is not sent after abort

  2. i want to skip 3rd file from upload queue - it is not a abort because current file only we can abort

here is how i'm doing it

    var uploadFileList = [];

   add: function (e, data) {
             uploadFileList.push(data.files[0].name);
             data.submit();
     },
    
    .on('fileuploadchunksend', function (e, data) {
            /** Abort code starts here **/
            var filename = uploadFileList[1]; //abort 2nd file
            var currentFilename = data.files[0].name;
            if(currentFilename == filename){
                  data.abort();
             }
            /** Abort code Ends here **/

            //skip code
             data.originalFiles.splice(3,1);
        })

Note: i don't want any ui for abort or skip

here is full code (not skipping): http://jsfiddle.net/eabangalore/dm9j5uzn/84/

For current upload it will be abort and for queue it will be skip.

Please help me thanks in advance!!



from how to skip file from current upload queue at run time with blueimp fileupload

No comments:

Post a Comment