lundi 1 février 2016

s2 get Signature and Expiery date back after save

I have some files saving to a Private s3 bucket. I need these files to have expiry dates. I've noticed that in S3 a file can be opened in multiple ways.

For example: Signed URL (Expires Today at 12:00:00) Signed URL (Expires Tomorrow at 12:00:00)... and so on.

The URLs that S3 provide have three parameters included. The KeyId, Signature, and Expires.

The KeyId is your own bucket key. This is understood. The expiry can be set in PHP code when you are 'putting' to S3. However the Signature seems to be a randomly generated string created by S3.

Upon saving a file to S3. How would I go about getting this information so that I can provide this link to a user and notify them they have XXX amount of time to download their item?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire