From e99dc7df6c9cb7deba4c825bba0d66faba5ea448 Mon Sep 17 00:00:00 2001 From: Yandols ZeonX Date: Fri, 12 Apr 2019 01:51:23 +0800 Subject: [PATCH] Fixed forgetting to parse the new algorithm into the filename itself. --- upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload.php b/upload.php index 58e92f1..129c521 100644 --- a/upload.php +++ b/upload.php @@ -88,7 +88,7 @@ if ($uploadOk == 0) { //$newfilename = time() . '_' . rand(1000000, 9999999) . '.' . end(explode(".",$_FILES["fileToUpload"]["name"])); --prior to v0.6b //$newfilename = time() . '_' . rand(100, 999) . '_' . rand(100000000, 999999999) . '.' . end(explode(".",$_FILES["fileToUpload"]["name"])); --prior to v0.8 //$newfilename = $randomFilename . '.' . end(explode(".",$_FILES["fileToUpload"]["name"])); - $newfilename = $randomFilename . '.' . end(explode(".",$_FILES["fileToUpload"]["name"])); + $newfilename = $dayId . $hourId . $randomFilename . '.' . end(explode(".",$_FILES["fileToUpload"]["name"])); $newtarget = $target_dir . $newfilename; if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $newtarget)) { chmod("$newtarget", 0775); // Set read and write permissions if file