add custom s3 support storage config option (#239)

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
This commit is contained in:
OrangeDrangon
2025-10-26 11:58:26 -04:00
committed by GitHub
parent fea228d03e
commit 0b393a0d6d
2 changed files with 18 additions and 1 deletions

View File

@@ -107,3 +107,12 @@ BRAND_NAME=
# CLOUDFLARE_SECRET_ACCESS_KEY=
# CLOUDFLARE_BUCKET=
#
# Generic S3
# ==========
# ACTIVE_STORAGE_SERVICE=generic_s3 <- Enables Generic S3 storage
# GENERIC_S3_ACCESS_KEY_ID=
# GENERIC_S3_SECRET_ACCESS_KEY=
# GENERIC_S3_REGION=
# GENERIC_S3_BUCKET=
# GENERIC_S3_ENDPOINT=
# GENERIC_S3_FORCE_PATH_STYLE= <- defaults to false

View File

@@ -22,4 +22,12 @@ cloudflare:
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")) %>