diff --git a/docs/javascript.html b/docs/javascript.html index 5cb9184e..cbb93391 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -539,7 +539,7 @@ $('.inputmask').inputmask({ maxSize - int + float Use this option if you want to limit file upload size. It's in MB and should be set for .fileinput element. For ex. data-max-size="3" allows upload only for files with size <= 3MB. If several files are selected, and only one of them is greater then this option value, all files will be discarded. Event max_size.bs.fileinput is triggered on discard. diff --git a/js/fileinput.js b/js/fileinput.js index 06379c26..ac9401c7 100644 --- a/js/fileinput.js +++ b/js/fileinput.js @@ -64,7 +64,7 @@ Fileinput.prototype.verifySizes = function(files) { if (typeof this.options.maxSize === 'undefined') return true - var max = parseInt(this.options.maxSize) + var max = parseFloat(this.options.maxSize) if (max !== this.options.maxSize) return true for (var i = 0; i < files.length; i++) {