Skip to content

Commit 648635d

Browse files
committed
Set AWS for staging env
1 parent 3adcd9d commit 648635d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

config/initializers/carrier_wave.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33

44
if Rails.env.development?
55
config.storage = :file
6-
# if Rails.env.production?
7-
# config.cache_dir = "#{Rails.root}/tmp/uploads"
8-
# config.root = Rails.root.join('tmp')
9-
# config.sftp_host = ENV['UPLOADER_ASSET_HOST']
10-
# config.sftp_user = ENV['UPLOADER_USER']
11-
# config.sftp_folder = ENV['UPLOADER_FOLDER']
12-
# config.sftp_url = ENV['UPLOADER_URL']
13-
# config.sftp_options = {
14-
# password: ENV['UPLOADER_PASSW'],
15-
# port: 22
16-
# }
176
elsif Rails.env.production?
7+
config.cache_dir = "#{Rails.root}/tmp/uploads"
8+
config.root = Rails.root.join('tmp')
9+
config.sftp_host = ENV['UPLOADER_ASSET_HOST']
10+
config.sftp_user = ENV['UPLOADER_USER']
11+
config.sftp_folder = ENV['UPLOADER_FOLDER']
12+
config.sftp_url = ENV['UPLOADER_URL']
13+
config.sftp_options = {
14+
password: ENV['UPLOADER_PASSW'],
15+
port: 22
16+
}
17+
elsif Rails.env.staging?
1818
config.storage = :aws
1919
config.aws_bucket = ENV.fetch('S3_BUCKET_NAME', 'codebar-logos')
2020
config.aws_acl = 'public-read'

0 commit comments

Comments
 (0)