Skip to content

Node.js based forum software built for the modern web

Set default hasValidFileSize return to true

Raphael Beer58cc25e38573
diff --git a/public/src/modules/uploader.js b/public/src/modules/uploader.js
index 65e1a481e3..6a0d7f161a 100644
--- a/public/src/modules/uploader.js
+++ b/public/src/modules/uploader.js
@@ -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;