0

I want to upload files simultaneously.

This is my Resumable config.

 this.resumable = new Resumable({
            target: endpoint,
            simultaneousUploads: 4,
            maxFiles: 4,
            chunkSize:1*1024*1024,
            testChunks:false,
        });

and I called upload on the fileAdded event.

this.resumable.on('fileAdded', (file) => {
            this.resumable.upload();
});

This setup is uploading only a single file in time. What am I doing wrong? Documentation is not helpful at all...

1 Answers1

0

The actual uploading for ResumableJS starts with this line of code.

this.resumable.upload();

Hence, from what you have showed, uploading starts as soon as a single file is added.

You will have to remove the line from the 'fileAdded' closure. And start the upload separately triggered by a form submission (or however you please).

checkmate101
  • 89
  • 2
  • 12