mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 06:21:23 +00:00
Options are documented here including an example on how to set a custom endpoint: https://guides.rubyonrails.org/active_storage_overview.html#s3-service-amazon-s3-and-s3-compatible-apis
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
local:
|
|
service: Disk
|
|
root: <%= Rails.root.join("storage") %>
|
|
|
|
test:
|
|
service: Disk
|
|
root: <%= Rails.root.join("tmp/storage") %>
|
|
|
|
amazon:
|
|
service: S3
|
|
access_key_id: <%= ENV["S3_ACCESS_KEY_ID"] %>
|
|
secret_access_key: <%= ENV["S3_SECRET_ACCESS_KEY"] %>
|
|
region: <%= ENV["S3_REGION"] || "us-east-1" %>
|
|
bucket: <%= ENV["S3_BUCKET"] %>
|
|
|
|
cloudflare:
|
|
service: S3
|
|
endpoint: https://<%= ENV['CLOUDFLARE_ACCOUNT_ID'] %>.r2.cloudflarestorage.com
|
|
access_key_id: <%= ENV['CLOUDFLARE_ACCESS_KEY_ID'] %>
|
|
secret_access_key: <%= ENV['CLOUDFLARE_SECRET_ACCESS_KEY'] %>
|
|
region: auto
|
|
bucket: <%= ENV['CLOUDFLARE_BUCKET'] %>
|
|
request_checksum_calculation: "when_required"
|
|
response_checksum_validation: "when_required"
|
|
|
|
generic_s3:
|
|
service: S3
|
|
access_key_id: <%= ENV["GENERIC_S3_ACCESS_KEY_ID"] %>
|
|
secret_access_key: <%= ENV["GENERIC_S3_SECRET_ACCESS_KEY"] %>
|
|
region: <%= ENV["GENERIC_S3_REGION"] %>
|
|
bucket: <%= ENV["GENERIC_S3_BUCKET"] %>
|
|
endpoint: <%= ENV["GENERIC_S3_ENDPOINT"] %>
|
|
force_path_style: <%= ActiveModel::Type::Boolean.new.cast(ENV.fetch("GENERIC_S3_FORCE_PATH_STYLE", "false")) %>
|