added too short name error

This commit is contained in:
Václav Šmejkal 2024-05-25 15:53:45 +02:00
parent a077218282
commit 39ed833d68
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,12 @@ if (!isset($_POST["name"]))
goto send;
}
if (strlen($_POST["name"]) < 4)
{
$status = 5;
goto send;
}
$file_format = strtolower(pathinfo($_FILES["file_upload"]["name"], PATHINFO_EXTENSION));
if (!in_array($file_format, $supported_formats))

View File

@ -89,6 +89,10 @@
case 4:
alert("Příliš velký obrázek!\nMaximální velikost je 5MB!");
break;
case 5:
alert("Název musí být dlouhý alespoň 4 znaky!");
break;
}
}
});