Files
openfoodnetwork/config/storage.yml
Matt-Yorkley e54cff2274 Set images to public-read
Defining an alternate s3 configuration set to `public: true` means we can use it selectively. It sets the objects to `acl: "public-read"` by default (read-only) and means any image tags for those assets can use direct public links in the src attribute (without hitting the ActiveStorage::Representation endpoint). The default non-public service will still be used by default for any other files on instances using s3.
2023-06-14 10:56:10 +01:00

30 lines
676 B
YAML

local:
service: Disk
root: <%= Rails.root.join("storage") %>
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
test_amazon:
service: S3
access_key_id: "A...A"
secret_access_key: "H...H"
bucket: "ofn"
region: "us-east-1"
amazon:
service: S3
access_key_id: <%= ENV["S3_ACCESS_KEY"] %>
secret_access_key: <%= ENV["S3_SECRET"] %>
bucket: <%= ENV["S3_BUCKET"] %>
region: <%= ENV.fetch("S3_REGION", "us-east-1") %>
amazon_public:
service: S3
public: true
access_key_id: <%= ENV["S3_ACCESS_KEY"] %>
secret_access_key: <%= ENV["S3_SECRET"] %>
bucket: <%= ENV["S3_BUCKET"] %>
region: <%= ENV.fetch("S3_REGION", "us-east-1") %>