angular-file-upload icon indicating copy to clipboard operation
angular-file-upload copied to clipboard

Upload all the files together? Not one after another

Open Jubayer- opened this issue 9 years ago • 17 comments

Is it possible to make all the files upload together rather than uploading one after another?

This will be a nice feature. asynchronously uploading all the files together.

Jubayer- avatar May 05 '15 14:05 Jubayer-

+1...I'm looking for this too...Seems like it must be possible

itjustwerks avatar May 06 '15 19:05 itjustwerks

+1 as well - I logged the the $_FILES variable in PHP and it returns only one of two files I upload.

sunlee-newyork avatar May 19 '15 20:05 sunlee-newyork

+1

mribichich avatar May 26 '15 20:05 mribichich

+1

brucejcw avatar Jun 23 '15 12:06 brucejcw

+1

kunal999 avatar Sep 07 '15 21:09 kunal999

+1

MartinAmsinck avatar Sep 17 '15 09:09 MartinAmsinck

+1

nervestaple avatar Sep 21 '15 15:09 nervestaple

+1

codeislyric avatar Oct 02 '15 14:10 codeislyric

+1

celsomtrindade avatar Oct 03 '15 11:10 celsomtrindade

+1

nazmulhossain avatar Oct 04 '15 10:10 nazmulhossain

I got a workaround: use the callback: onAfterAddingAll

// in controller:
$scope.uploader.onAfterAddingAll = function(addedItems) {
        var fileItem_0 = $scope.uploader.queue[0];
        // fileItem_0.filenames = fileItem_0.file.name;
        // fileItem_0.filessize = fileItem_0.file.size;
        var tFileItem;
        var pop_times = $scope.uploader.queue.length;
        for(var i=1; i<pop_times; i++){
            tFileItem = $scope.uploader.queue.pop();
            fileItem_0.formData.push({file: tFileItem._file});
            // fileItem_0.filessize = fileItem_0.filessize + tFileItem._file.size;
            // fileItem_0.filenames = fileItem_0.filenames + ' ' + tFileItem.file.name
        }
        // ... ready to upload
}

btw, removeAfterUpload should be set true.

DoubleFaults avatar Oct 10 '15 11:10 DoubleFaults

+1

giuseppecrj avatar Nov 12 '15 18:11 giuseppecrj

+1

dmaslov avatar Jan 25 '16 10:01 dmaslov

+1

chirkin avatar Jun 02 '16 09:06 chirkin

+1

Makashov avatar Aug 16 '16 12:08 Makashov

+1

stvhanna avatar Feb 02 '17 19:02 stvhanna

@DoubleFaults the solution works. Thanks. However the upload queue list does not list all documents, but rather only one. How can this be fixed?

linguation avatar Dec 22 '21 11:12 linguation