How can I preserve a files date/time stamp when uploading to Amazon s3?

amazon-s3

Solution

You cannot change the LastModified field. But you can add custom metadata (Amazon calls this "user metadata") to store the information: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html

You can store the date here and then retrieve it using the S3 API.

Problem

When ever we upload files to S3 (using a clinet like cloudberry), the files date changes to the upload date. Is there a way to keep the current date/time?

Original source