Skip to content

Instantly share code, notes, and snippets.

@eltiare
Created July 18, 2012 16:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eltiare/3137387 to your computer and use it in GitHub Desktop.
Save eltiare/3137387 to your computer and use it in GitHub Desktop.
Example of a CarrierWave S3 configuration
# Here's what I have in my CarrierWave configuration file
require 'carrierwave/processing/mime_types'
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS', # required
:aws_access_key_id => 'REPLACE WITH AWS KEY', # required
:aws_secret_access_key => 'REPLACE WITH AWS SECRET' # required
}
config.fog_directory = 'name_of_bucket' # required
config.fog_host = 'https://name_of_bucket.s3.amazonaws.com' # optional, defaults to nil - OPTIONAL UNLESS YOU WANT IT TO WORK!
config.fog_public = true # optional, defaults to true
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment