Last active
September 11, 2015 14:39
-
-
Save TiuTalk/860b6eee7e7f1452b3cd to your computer and use it in GitHub Desktop.
This file contains 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
def download_url | |
if s3_file? | |
path = URI.parse(url).path[1..-1] | |
fog_storage.directories.new(key: s3_bucket).files.new(key: path).url(15.minutes.from_now) | |
else | |
url | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment