Fix upload_script to actually use max size variables

This commit is contained in:
Anuj Deshpande
2024-12-13 10:09:47 +05:30
committed by GitHub
parent cb3ac7429c
commit c81c6cfb3a

View File

@@ -49,8 +49,8 @@ function upload() {
alert("File path on server cannot have spaces!"); alert("File path on server cannot have spaces!");
} else if (filePath[filePath.length-1] == '/') { } else if (filePath[filePath.length-1] == '/') {
alert("File name not specified after path!"); alert("File name not specified after path!");
} else if (fileInput[0].size > 200*1024) { } else if (fileInput[0].size > MAX_FILE_SIZE) {
alert("File size must be less than 200KB!"); alert("File size must be less than "+MAX_FILE_SIZE_STR+"!");
} else { } else {
document.getElementById("newfile").disabled = true; document.getElementById("newfile").disabled = true;
document.getElementById("filepath").disabled = true; document.getElementById("filepath").disabled = true;