-
-
Save stream7/1251576 to your computer and use it in GitHub Desktop.
Paperclip initializer for S3 Europe.
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
Paperclip.interpolates(:s3_eu_url) { |attachment, style| | |
"#{attachment.s3_protocol}://s3-eu-west-1.amazonaws.com/#{attachment.bucket_name}/#{attachment.path(style).gsub(%r{^/}, "")}" | |
} | |
require 'aws/s3' | |
AWS::S3::DEFAULT_HOST = "s3-eu-west-1.amazonaws.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment