Sha256: e88490d5c863beacd9ba56cc59822843ad0053890a870c730cc9b1f245bfed1b

Contents?: true

Size: 747 Bytes

Versions: 26

Compression:

Stored size: 747 Bytes

Contents

CarrierWave.configure do |config|

  config.cache_dir = File.join(Rails.root, 'tmp', 'uploads')

  case Rails.env.to_sym

  when :development
    config.storage = :file
    config.root = File.join(Rails.root, 'public')

  when :production
    # the following configuration works for Amazon S3
    config.storage          = :fog
    config.fog_credentials  = {
      provider:                 'AWS',
      aws_access_key_id:        ENV['S3_KEY_ID'],
      aws_secret_access_key:    ENV['S3_SECRET_KEY'],
      region:                   ENV['S3_BUCKET_REGION']
    }
    config.fog_directory    = ENV['S3_BUCKET']

  else
    # settings for the local filesystem
    config.storage = :file
    config.root = File.join(Rails.root, 'public')
  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.6 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.6.rc2 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.6.rc1 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.5 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.4 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.3 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.2 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.1 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.0 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.0.rc3 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.0.rc2 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.5.0.rc1 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.4.1 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.4.0 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.3.1 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.3.0 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.2.3 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.2.2 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.2.1 lib/generators/locomotive/install/templates/carrierwave.rb