Created
April 19, 2011 15:32
-
-
Save serek/928462 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.replace "s3-eu-west-1.amazonaws.com" |
Actually I had it in my initializer file but forgot to update it here.
Thanks mmarschall!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To avoid the warning on server startup you can use: