Skip to content

Commit 79012c2

Browse files
committed
Save link to upload method & add argument for send last blob
1 parent 7e655a8 commit 79012c2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

js/jquery.fileupload.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -844,16 +844,20 @@
844844
]);
845845
}
846846
// The chunk upload method:
847-
upload = function () {
847+
upload = function (blob) {
848848
// Clone the options object for each chunk upload:
849-
var o = $.extend({}, options),
849+
var o = $.extend({}, options, { upload: upload }),
850850
currentLoaded = o._progress.loaded;
851-
o.blob = slice.call(
852-
file,
853-
ub,
854-
ub + ($.type(mcs) === 'function' ? mcs(o) : mcs),
855-
file.type
856-
);
851+
852+
o.blob =
853+
blob ||
854+
slice.call(
855+
file,
856+
ub,
857+
ub + ($.type(mcs) === 'function' ? mcs(o) : mcs),
858+
file.type
859+
);
860+
857861
// Store the current chunk size, as the blob itself
858862
// will be dereferenced after data processing:
859863
o.chunkSize = o.blob.size;

0 commit comments

Comments
 (0)