Closed crhuber closed 5 years ago
Based on my understanding, the expires param in tinys3 is used to set cache-control header which can be used by CloudFront to decide how long they can cache the file. The Expiry Date is the configuration rule you can set in aws s3 UI.
Okay, probably good to make that more clear in the documentation. I just tried doing the same thing and was confused when the files were not expiring.
I'm uploading a file to S3 using such as below. But when I look at the object in S3 after the upload, the Expiry Date = None.
t = datetime.timedelta(weeks=5) s3_response = conn.upload("input/%s" % filename, file_obj, bucket='mybucket', expires=t)
Here is the file in S3:
Bucket: mybucket Folder: input Name: file1.mp4 Link: This is a public link Size: 57461769 Last Modified: Thu Nov 05 09:30:08 GMT-500 2015 ETag: 896378299cd48c0490d1f4bb6c111111 Expiry Date: None Expiration Rule: N/A