Set default hasValidFileSize return to true

v1.18.x
Raphael Beer 9 years ago
parent ff09789812
commit 58cc25e385

@ -66,7 +66,7 @@ define('uploader', ['csrf', 'translator'], function(csrf, translator) {
if (!fileInput.val()) {
return showAlert('error', '[[uploads:select-file-to-upload]]');
}
if (hasValidFileSize(fileInput[0], fileSize) === false) {
if (!hasValidFileSize(fileInput[0], fileSize)) {
return showAlert('error', '[[error:file-too-big, ' + fileSize + ']]');
}
@ -120,6 +120,7 @@ define('uploader', ['csrf', 'translator'], function(csrf, translator) {
if (window.FileReader && maxSize) {
return fileElement.files[0].size <= maxSize * 1000;
}
return true;
}
return module;

Loading…
Cancel
Save