enforce upload limit (just incase)

This commit is contained in:
Lee 2023-04-15 18:41:20 +01:00
parent 86c19ac386
commit 70bcd42acc

@ -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";