Skip to content

Commit

Permalink
Fix wrong carrier wave configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbeau committed Oct 15, 2024
1 parent bc939d3 commit 6c242c9
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions shopinvader/config/initializers/carrierwave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,26 @@
config.aws_bucket = ENV['S3_BUCKET']
config.aws_acl = 'public-read'

# Use a different endpoint (eg: another provider such as Exoscale)
if ENV['S3_ENDPOINT'].present?
config.aws_credentials[:endpoint] = ENV['S3_ENDPOINT']
end

# For some endpoint like minio you need to rewrite path
if ENV['S3_PATH_STYLE'].present?
config.aws_credentials[:force_path_style] = ENV['S3_PATH_STYLE']
end

config.aws_attributes = {
cache_control: ENV['S3_CACHE_CONTROL']
}


config.aws_credentials = {
access_key_id: ENV['S3_KEY_ID'],
secret_access_key: ENV['S3_SECRET_KEY'],
region: ENV['S3_BUCKET_REGION']
}

# Use a different endpoint (eg: another provider such as Exoscale)
if ENV['S3_ENDPOINT'].present?
config.aws_credentials[:endpoint] = ENV['S3_ENDPOINT']
end

# For some endpoint like minio you need to rewrite path
if ENV['S3_PATH_STYLE'].present?
config.aws_credentials[:force_path_style] = ENV['S3_PATH_STYLE']
end

end

Expand Down

0 comments on commit 6c242c9

Please sign in to comment.