Reputation: 1009
I have an application to upload files to a server.
However, when the files are uploaded, the "Date Modified" changes to the current date/time.
Is there a way to preserve the date of the uploaded file? Or is there a way to change the Date Modified on the uploaded file?
The only answer I have found so far uses Java and dates back to 2006 CFFile and Last Modified Date. Is there a better way to do the same now?
Upvotes: 1
Views: 803
Reputation: 28873
A basic html file upload does not provide the original modification date from the client o/s. However, there is a simpler way to change the modified date of server files, as of CF9+: FileSetLastModified().
FileSetLastModified(result.serverDirectory &"/"& result.serverFile, dateValue )
Upvotes: 2