Sha256: 0aa66f82f7af648aa27358d0ffc542b9085fc9b03ac6975bba21fffa6d1aefae

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

CarrierWave.configure do |config|
  config.root = Rails.root.join('tmp')
  config.cache_dir = 'carrierwave'

  if Rails.env.production?
    config.storage = :aws
    config.aws_authenticated_url_expiration = 60 * 60 * 24 * 7

    config.aws_attributes = {
      expires: 1.week.from_now.httpdate,
      cache_control: 'max-age=604800'
    }

    config.aws_credentials = {
      aws_access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
      aws_secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY')
    }

    config.aws_bucket = ENV.fetch('AWS_BUCKET')
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pineapples-0.3.345 lib/pineapples/templates/config/initializers/carrierwave!=carrierwave!.rb