mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
While we migrate from Paperclip to Active Storage, we need to use both at the same time to avoid any downtime or lost images. Once the migration is complete, we want to use the same name for attachment as before. Using Paperclip and Active Storage at the same time creates a name conflict on a couple of methods. I'm using alias_method as a temporary solution to access Active Storage methods. We will remove that after the migration. I declare Paperclip afterwards so that we have those methods declarations for backwards compatibility now.
22 lines
454 B
YAML
22 lines
454 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") %>
|