Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 1a6d61a

Browse files
edenzzPowerKiKi
authored andcommitted
onCompletedAll event is triggered everytime all uploads finish
From my POV 'onCompletedAll' event should be triggered everytime all uploads finish. Let me explain the issue (test case): - If I would make for example 'x' (variable) uploads (the event 'onCompletedAll' would be triggered). - The next time I would upload 'x' (variable) uploads (without clearing the previous uploads), the event 'onCompletedAll' would not be triggered.
1 parent 739d112 commit 1a6d61a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function uiUploader($log) {
120120
if (angular.isFunction(self.options.onCompleted)) {
121121
self.options.onCompleted(file, xhr.responseText, xhr.status);
122122
}
123-
if (self.uploadedFiles === self.files.length) {
123+
if (self.activeUploads === 0) {
124124
self.uploadedFiles = 0;
125125
if (angular.isFunction(self.options.onCompletedAll)) {
126126
self.options.onCompletedAll(self.files);

0 commit comments

Comments
 (0)