yes!
This commit is contained in:
@ -22,16 +22,15 @@ function generateMapId()
|
||||
function isZipFile($file)
|
||||
{
|
||||
$fileType = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
echo $fileType;
|
||||
die();
|
||||
return $fileType == "zip";
|
||||
}
|
||||
|
||||
$mapId = generateMapId(); // the id of the map
|
||||
|
||||
$file = $_FILES["map"]["tmp_name"]; // the file to upload
|
||||
$map = $_FILES["map"]; // the file to upload
|
||||
$file = $map["tmp_name"]; // the temporary file path
|
||||
|
||||
if (!isZipFile($file)) {
|
||||
if (!isZipFile($map["name"])) {
|
||||
echo "The file is not a zip file";
|
||||
die();
|
||||
}
|
||||
|
Reference in New Issue
Block a user