Sha256: 3a3d958ac0eb0340835a11e75a770bb680f07246344224d9e5b50de0ee55e110

Contents?: true

Size: 747 Bytes

Versions: 9

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                   => 'us-east-1'
    }
    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

9 entries across 9 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc11 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc10 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc9 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc8 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc7 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc6 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc5 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc4 lib/generators/locomotive/install/templates/carrierwave.rb
locomotive_cms-2.0.0.rc2 lib/generators/locomotive/install/templates/carrierwave.rb