{"action":"created","issue":{"url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter/issues/1","repository_url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter","labels_url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter/issues/1/comments","events_url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter/issues/1/events","html_url":"https://github.com/EHRI/omeka-amazon-s3-storage-adapter/issues/1","id":188085516,"number":1,"title":"\"expiration\" implementation issue","user":{"login":"zerocrates","id":298975,"avatar_url":"https://avatars.githubusercontent.com/u/298975?v=3","gravatar_id":"","url":"https://api.github.com/users/zerocrates","html_url":"https://github.com/zerocrates","followers_url":"https://api.github.com/users/zerocrates/followers","following_url":"https://api.github.com/users/zerocrates/following{/other_user}","gists_url":"https://api.github.com/users/zerocrates/gists{/gist_id}","starred_url":"https://api.github.com/users/zerocrates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerocrates/subscriptions","organizations_url":"https://api.github.com/users/zerocrates/orgs","repos_url":"https://api.github.com/users/zerocrates/repos","events_url":"https://api.github.com/users/zerocrates/events{/privacy}","received_events_url":"https://api.github.com/users/zerocrates/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-08T19:45:45Z","updated_at":"2016-11-10T12:28:02Z","closed_at":null,"body":"There's a small but significant difference between the behavior of our old \"ZendS3\" adapter and this one, and it deals with the \"expiration\" setting.\r\n\r\nIn the Omeka core adapter, setting \"expiration\" means objects are stored privately and pre-signed URLs are generated to allow short-term public access to them. The implementation here of `_getAcl()` still goes along with that way of working, setting the ACL to private if some expiration was provided.\r\n\r\nThe divergence is what's actually being done with the expiration data itself. You're passing it along as \"Expiration\" when you put the object. I'm not sure this does anything at all (if it does do something, I don't know what). To keep in line with what the Omeka adapter does, you'd want to use `_getExpiration` in the `getUri` method.\r\n\r\nIf no expiration is set, the code you have there is fine, just returning a URL to the object. If there is a set expiration though, you want to pass the third argument to `getObjectUrl` (something like `\"+{$expiration} minutes\"`, for example). Passing that third argument should get it to generate a pre-signed URL for you."},"comment":{"url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter/issues/comments/259677855","html_url":"https://github.com/EHRI/omeka-amazon-s3-storage-adapter/issues/1#issuecomment-259677855","issue_url":"https://api.github.com/repos/EHRI/omeka-amazon-s3-storage-adapter/issues/1","id":259677855,"user":{"login":"mikesname","id":871049,"avatar_url":"https://avatars.githubusercontent.com/u/871049?v=3","gravatar_id":"","url":"https://api.github.com/users/mikesname","html_url":"https://github.com/mikesname","followers_url":"https://api.github.com/users/mikesname/followers","following_url":"https://api.github.com/users/mikesname/following{/other_user}","gists_url":"https://api.github.com/users/mikesname/gists{/gist_id}","starred_url":"https://api.github.com/users/mikesname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikesname/subscriptions","organizations_url":"https://api.github.com/users/mikesname/orgs","repos_url":"https://api.github.com/users/mikesname/repos","events_url":"https://api.github.com/users/mikesname/events{/privacy}","received_events_url":"https://api.github.com/users/mikesname/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T12:28:02Z","updated_at":"2016-11-10T12:28:02Z","body":"Thanks for clarifying that, I was a bit hazy on the use-case :wink:  \r\n\r\nHopefully should be fixed in #2 ..."}}
{"actor":{"display_login":"mikesname"}}