Fixed forgetting to parse the new algorithm into the filename itself.

master
YandolsZX 6 years ago
parent 69ad885419
commit e99dc7df6c
  1. 2
      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(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 = 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 = $randomFilename . '.' . end(explode(".",$_FILES["fileToUpload"]["name"])); $newfilename = $dayId . $hourId . $randomFilename . '.' . end(explode(".",$_FILES["fileToUpload"]["name"]));
$newtarget = $target_dir . $newfilename; $newtarget = $target_dir . $newfilename;
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $newtarget)) { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $newtarget)) {
chmod("$newtarget", 0775); // Set read and write permissions if file chmod("$newtarget", 0775); // Set read and write permissions if file

Loading…
Cancel
Save