Skip to content
Snippets Groups Projects
Unverified Commit e54208f7 authored by Moritz's avatar Moritz Committed by GitHub
Browse files

S3-compatible object storage API (#2720)

* s3 active_storage

* updated readme
parent cb3e597a
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,8 @@ Rails.application.configure do
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = if ENV["AWS_ACCESS_KEY_ID"].present?
:amazon
elsif ENV["S3_ACCESS_KEY_ID"].present?
:s3
elsif ENV["GCS_PRIVATE_KEY_ID"].present?
:google
else
......
......@@ -13,6 +13,13 @@ amazon:
secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
region: <%= ENV['AWS_REGION'] %>
bucket: <%= ENV['AWS_BUCKET'] %>
s3:
service: S3
endpoint: <%= ENV['S3_ENDPOINT'] %>
access_key_id: <%= ENV['S3_ACCESS_KEY_ID'] %>
secret_access_key: <%= ENV['S3_SECRET_ACCESS_KEY'] %>
region: <%= ENV['S3_REGION'] %>
bucket: <%= ENV['S3_BUCKET'] %>
# Remember not to checkin your GCS keyfile to a repository
google:
......
......@@ -326,6 +326,13 @@ DEFAULT_REGISTRATION=open
# AWS_REGION=
# AWS_BUCKET=
#
# For S3-compatible API:
# S3_ENDPOINT=
# S3_ACCESS_KEY_ID=
# S3_SECRET_ACCESS_KEY=
# S3_REGION=
# S3_BUCKET=
#
# For GCS Storage:
# GCS_PROJECT_ID=
# GCS_PRIVATE_KEY_ID=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment