Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions dist/angular-file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ return /******/ (function(modules) { // webpackBootstrap
var transport = this.isHTML5 ? "_xhrTransport" : "_iframeTransport";

item._prepareToUploading();
if (this.isUploading) {
if (item.isUploading) {
return;
}this.isUploading = true;
this[transport](item);
Expand Down Expand Up @@ -290,9 +290,8 @@ return /******/ (function(modules) { // webpackBootstrap
if (!items.length) {
return;
}forEach(items, function (item) {
return item._prepareToUploading();
return item.upload();
});
items[0].upload();
}
},
cancelAll: {
Expand Down Expand Up @@ -365,17 +364,15 @@ return /******/ (function(modules) { // webpackBootstrap
});
}
},
getReadyItems: {
getUploadingItems: {
/**
* Returns items ready for upload
* Return currently uploading items
* @returns {Array}
*/

value: function getReadyItems() {
value: function getUploadingItems() {
return this.queue.filter(function (item) {
return item.isReady && !item.isUploading;
}).sort(function (item1, item2) {
return item1.index - item2.index;
return item.isUploading;
});
}
},
Expand Down Expand Up @@ -942,14 +939,13 @@ return /******/ (function(modules) { // webpackBootstrap
item._onComplete(response, status, headers);
this.onCompleteItem(item, response, status, headers);

var nextItem = this.getReadyItems()[0];
this.isUploading = false;

if (isDefined(nextItem)) {
nextItem.upload();
var currentlyUploadingItems = this.getUploadingItems();
if (currentlyUploadingItems.length > 0) {
return;
}

this.isUploading = false;

this.onCompleteAll();
this.progress = this._getTotalProgress();
this._render();
Expand Down Expand Up @@ -1995,5 +1991,4 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ }
/******/ ])
});
;
//# sourceMappingURL=angular-file-upload.js.map
;
Loading