Skip to content

Commit

Permalink
Fix S3 public bucket configuration (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi authored Nov 21, 2024
1 parent 0a9497a commit 4c84055
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ storage_default: &storage_default
provider: <%= Decidim::Env.new("STORAGE_PROVIDER", "local").to_s %>
cdn_host: <%= ENV["STORAGE_CDN_HOST"] %>
s3:
public: <%= Decidim::Env.new("AWS_PUBLIC", "false").to_boolean_string %>
public: <%= Decidim::Env.new("AWS_PUBLIC", "false").present? %>
access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
region: <%= ENV["AWS_REGION"] %>
Expand Down
2 changes: 1 addition & 1 deletion config/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local:

s3:
service: S3
public: <%= Rails.application.secrets.dig(:storage, :s3, :public) %>
<%= "public: true" if Rails.application.secrets.dig(:storage, :s3, :public) %>
access_key_id: <%= Rails.application.secrets.dig(:storage, :s3, :access_key_id) %>
secret_access_key: <%= Rails.application.secrets.dig(:storage, :s3, :secret_access_key) %>
bucket: <%= Rails.application.secrets.dig(:storage, :s3, :bucket) %>
Expand Down

0 comments on commit 4c84055

Please sign in to comment.