Capture the renamed filename of a duplicate thumnail image on upload
Hi Guys, I am using ### $filenamelink = $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ### to capture the name of an uploaded image. I am using $filenamelink in both insert and update queries.
Works fine perfect.
If I add the option to create a thumbnail image, how would I get the file name of the thumbnail assuming I have told the code to add "_small" to it and the image encounters a duplicate so my image that goes up as "test.jpg" would actually be on the server as "test_1_small.jpg"
Is it possible to capture the renamed file name for the thumbnail so I can update a database record at the same time with this name along with the larger version which I have working fine at the minute?
I have attached my code.
As updating the image is optional for the user you will see I have a simple if statement to handle this. Its just catching the renamed file name that I am stuck on.