Hello Adam,
Your codes displayed above are for "Generating a file name automatically" or for "Renaming a file after upload" ?
I'd like the example below :
i.e : I've already uploaded the file named "abc.jpg" yesterday and today i've the same file named "abc.jpg" and i want that today file name will be auto generated like to "abc-15465326.jpg", so my yesterday file name will not be overwrited.
Regards.