Sha256: 81c8ade51932268e612adbf11317773847ed12fb3f1ab5883ffe1fdd39258a9c

Contents?: true

Size: 719 Bytes

Versions: 8

Compression:

Stored size: 719 Bytes

Contents

#
#  Carrier Wave configuration block
#
CarrierWave.configure do |config|

  if Rails.env.production? or Rails.env.staging?

    config.storage = :fog
    config.root = Rails.root.join('tmp')
    config.cache_dir = 'uploads'

    config.fog_credentials = {
      provider:              'AWS',
      aws_access_key_id:     ENV["LALALA_S3_ACCESS_KEY"],
      aws_secret_access_key: ENV["LALALA_S3_SECRET_KEY"]
    }

    config.fog_directory = File.join(
      ENV["LALALA_S3_BUCKET"],
      "storage",
      ENV["APP_NAME"],
      Rails.env.to_s,
      "assets"
    )

    config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
    config.asset_host     = ""


  else # dev
    config.storage = :file

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.111 config/initializers/carrierwave.rb
lalala-4.0.0.dev.109 config/initializers/carrierwave.rb
lalala-4.0.0.dev.107 config/initializers/carrierwave.rb
lalala-4.0.0.dev.94 config/initializers/carrierwave.rb
lalala-4.0.0.dev.92 config/initializers/carrierwave.rb
lalala-4.0.0.dev.90 config/initializers/carrierwave.rb
lalala-4.0.0.dev.84 config/initializers/carrierwave.rb
lalala-4.0.0.dev.80 config/initializers/carrierwave.rb