No commit activity in last 3 years
No release in over 3 years
Allows to use two services, primary and secondary for ActiveStorage
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

activestorage-cascade

This gem adds support for cascading services for ActiveStorage. This is ideal for development or staging environment where database refers actual objects in the production S3 bucket, but only as read-only.

Configuration

# config/storage.yml
# Services
disk:
  service: Disk
  root: <%= Rails.root.join("tmp/storage") %>

amazon:
  service: S3
  access_key_id: <%= Settings.aws.access_key_id %>
  secret_access_key: <%= Settings.aws.secret_access_key %>
  region: <%= Settings.aws.region %>
  bucket: <%= Settings.aws.bucket %>

# Configuration
development:
  service: Cascade
  primary: disk
  secondary: amazon
# config/environments/development.rb
Rails.application.configure do
  config.active_storage.service = :development
end