Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Allow maxChunkSize to be a function for dynamic chunk size support #3486

Merged
merged 1 commit into from
Aug 27, 2017
Merged
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
4 changes: 2 additions & 2 deletions js/jquery.fileupload.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
promise = dfd.promise(),
jqXHR,
upload;
if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
if (!(this._isXHRUpload(options) && slice && (ub || ($.type(mcs) === 'function' ? mcs(options) : mcs) < fs)) ||
options.data) {
return false;
}
Expand All @@ -753,7 +753,7 @@
o.blob = slice.call(
file,
ub,
ub + mcs,
ub + ($.type(mcs) === 'function' ? mcs(o) : mcs),
file.type
);
// Store the current chunk size, as the blob itself
Expand Down