I am using DropzoneJS script for uploading images with drag & drop, but now I\'m looking for a solution for how to add current timestamps with file name before uploading
I just used the standard php file rename.
$targetFile = $targetPath . $_FILES['file']['name']; //the original upload
$newfilename = "somename" . $variable . ".jpg"; //a new filename string
rename($targetFile , $new); //rename at the end of the function
This worked well for me and was pretty simple to implement. The .jpg extension is probably not recommended to hard code but in my scenario im only getting jpg file types.