Posted on 03/12/2018 17:11:29
The reason for adding timestamp to the photos is, that the files are being transferred to a local drive daily, and deleted from the dynamicweb folder. If two files have the same filename eg. image1.jpg, then the file on the local folder will be overwritten, which will cause havoc. If we rename the file on the local folder on the fly, then the problem will be with the email sent along with the form submittance, as the local link in the mail will be broken - since the filename is changed after being uploaded.
Therefore I was thinking of adding a timestamp to the filename, to ensure a unique filename. Another posibility would be to replace the filename totally with a 32 digit random string or something like that.
therefore I need to change the filename on upload.
Any ideas how this can be achieved?
/hans