Skip to content

Commit 6589b45

Browse files
authored
Merge pull request blueimp#3486 from cubiclesoft/master
Allow maxChunkSize to be a function for dynamic chunk size support
2 parents 25a1c48 + 883241b commit 6589b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/jquery.fileupload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@
730730
promise = dfd.promise(),
731731
jqXHR,
732732
upload;
733-
if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
733+
if (!(this._isXHRUpload(options) && slice && (ub || ($.type(mcs) === 'function' ? mcs(options) : mcs) < fs)) ||
734734
options.data) {
735735
return false;
736736
}
@@ -753,7 +753,7 @@
753753
o.blob = slice.call(
754754
file,
755755
ub,
756-
ub + mcs,
756+
ub + ($.type(mcs) === 'function' ? mcs(o) : mcs),
757757
file.type
758758
);
759759
// Store the current chunk size, as the blob itself

0 commit comments

Comments
 (0)