Created
November 2, 2009 23:16
-
-
Save mhawkins/224606 to your computer and use it in GitHub Desktop.
Generate expiring URLs for private S3 files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Paperclip::Storage::S3 | |
| def expiring_url(time = 3600) | |
| AWS::S3::S3Object.url_for(path, bucket_name, :expires_in => time ) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment