diff --git a/upload.php b/upload.php index df9d4e4..c4c124a 100644 --- a/upload.php +++ b/upload.php @@ -29,6 +29,12 @@ $mapId = generateMapId(); // the id of the map $map = $_FILES["map"]; // the file to upload $file = $map["tmp_name"]; // the temporary file path +$size = $map["size"]; // the size of the file + +if ($size > 100000000) { // if the file is larger than 100MB + echo "The file is too large"; + die(); +} if (!isZipFile($map["name"])) { echo "The file is not a zip file";