-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*! | ||
* Uploader - Uploader library implements html5 file upload and provides multiple simultaneous, stable, fault tolerant and resumable uploads | ||
* @version v0.2.1 | ||
* @version v0.2.2 | ||
* @author dolymood <[email protected]> | ||
* @link https://github.com/simple-uploader/Uploader | ||
* @license MIT | ||
|
@@ -351,7 +351,7 @@ var event = _dereq_('./event') | |
var File = _dereq_('./file') | ||
var Chunk = _dereq_('./chunk') | ||
|
||
var version = '0.2.1' | ||
var version = '0.2.2' | ||
|
||
// ie10+ | ||
var ie10plus = window.navigator.msPointerEnabled | ||
|
@@ -607,7 +607,7 @@ utils.extend(Uploader.prototype, { | |
// All chunks have been uploaded, complete | ||
this._triggerAsync('complete') | ||
} | ||
return false | ||
return outstanding | ||
}, | ||
|
||
upload: function (preventEvents) { | ||
|
@@ -620,6 +620,10 @@ utils.extend(Uploader.prototype, { | |
var started = false | ||
for (var num = 1; num <= this.opts.simultaneousUploads - ret; num++) { | ||
started = this.uploadNextChunk(!preventEvents) || started | ||
if (!started && preventEvents) { | ||
// completed | ||
break | ||
} | ||
} | ||
if (!started && !preventEvents) { | ||
this._triggerAsync('complete') | ||
|
Oops, something went wrong.