prevent the id is not used (#8)

This commit is contained in:
Beu 2020-02-24 22:49:25 +01:00
parent c0d66f4b25
commit e7d3921bc0

View File

@ -37,7 +37,11 @@
// Upload File
if ($_SERVER['REQUEST_METHOD'] === 'PUT')
{
$rnd_data = mt_rand(10000,99999);
do
{
$rnd_data = mt_rand(00000,99999);
} while (file_exists(_DATA_DIR . "/" . $rnd_data));
$filesize = 0 ;
mkdir(_DATA_DIR . "/" . $rnd_data);