Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Paperclip initializer for S3 Europe.
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"
@mmarschall

This comment has been minimized.

Copy link

commented Oct 20, 2011

To avoid the warning on server startup you can use:

AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com"
@serek

This comment has been minimized.

Copy link
Owner Author

commented Oct 20, 2011

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
You can’t perform that action at this time.