Skip to content

Commit

Permalink
Release v2.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasK committed Jun 5, 2020
1 parent 2cbe1e9 commit 922c4b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
17 changes: 13 additions & 4 deletions dist/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
decrement();
}
function readError(fileError) {
decrement();
throw fileError;
}
function decrement() {
Expand Down Expand Up @@ -750,7 +751,7 @@
* @type {string}
*/
this.uniqueIdentifier = (uniqueIdentifier === undefined ? flowObj.generateUniqueIdentifier(file) : uniqueIdentifier);

/**
* Size of Each Chunk
* @type {number}
Expand Down Expand Up @@ -1168,6 +1169,12 @@
*/
this.startByte = this.offset * this.chunkSize;

/**
* A specific filename for this chunk which otherwise default to the main name
* @type {string}
*/
this.filename = null;

/**
* Compute the endbyte in a file
*
Expand Down Expand Up @@ -1249,7 +1256,7 @@
delete this.data;
$.event(status, $.message());
$.flowObj.uploadNextChunk();
} else {
} else if (!$.fileObj.paused) {
$.event('retry', $.message());
$.pendingRetry = true;
$.abort();
Expand Down Expand Up @@ -1511,7 +1518,9 @@
each(query, function (v, k) {
data.append(k, v);
});
if (typeof blob !== "undefined") data.append(this.flowObj.opts.fileParameterName, blob, this.fileObj.file.name);
if (typeof blob !== "undefined") {
data.append(this.flowObj.opts.fileParameterName, blob, this.filename || this.fileObj.file.name);
}
}

this.xhr.open(method, target, true);
Expand Down Expand Up @@ -1629,7 +1638,7 @@
* Library version
* @type {string}
*/
Flow.version = '2.14.0';
Flow.version = '2.14.1';

if ( typeof module === "object" && module && typeof module.exports === "object" ) {
// Expose Flow as module.exports in loaders that implement the Node
Expand Down
Loading

0 comments on commit 922c4b3

Please sign in to comment.