Skip to content

Commit 3f2bc25

Browse files
committed
Now resume is only executed with files that are not completed
1 parent feda3c0 commit 3f2bc25

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/flow.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
initFileFn: null,
102102
readFileFn: webAPIFileRead
103103
};
104-
104+
105105
/**
106106
* Current options
107107
* @type {Object}
@@ -159,7 +159,7 @@
159159
/**
160160
* Set a callback for an event, possible events:
161161
* fileSuccess(file), fileProgress(file), fileAdded(file, event),
162-
* fileRemoved(file), fileRetry(file), fileError(file, message),
162+
* fileRemoved(file), fileRetry(file), fileError(file, message),
163163
* complete(), progress(), error(message, file), pause()
164164
* @function
165165
* @param {string} event
@@ -522,7 +522,9 @@
522522
*/
523523
resume: function () {
524524
each(this.files, function (file) {
525-
file.resume();
525+
if (!file.isComplete()) {
526+
file.resume();
527+
}
526528
});
527529
},
528530

@@ -707,7 +709,7 @@
707709
* @type {Flow}
708710
*/
709711
this.flowObj = flowObj;
710-
712+
711713
/**
712714
* Used to store the bytes read
713715
* @type {Blob|string}

0 commit comments

Comments
 (0)