Sha256: eda3582b7448ceaa23af71b5f34f384a4374becb5c4a29533591e701b403b918

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

CarrierWave.configure do |config|
  if Storytime.media_storage == :s3
    config.storage = :fog
    config.fog_credentials = {
      :provider               => 'AWS',
      :aws_access_key_id      => ENV['STORYTIME_AWS_ACCESS_KEY_ID'],
      :aws_secret_access_key  => ENV['STORYTIME_AWS_SECRET_KEY']
    }
    config.fog_directory  = Storytime.s3_bucket
    config.fog_public     = true
    config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}  # optional, defaults to {}
  else
    config.storage = :file
  end
  
  config.enable_processing = !Rails.env.test?
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
storytime-0.0.1 config/initializers/carrierwave.rb