Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 946 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 946 Bytes

ActiveStorageProxy

Engine for adding support to ActiveStorage based on this gist

Usage

rails_proxy_blob_url(signed_id: attachment.signed_id, filename: attachment.filename)`
variant = attachment.variant(:medium)
rails_proxy_blob_url(signed_id: attachment.signed_id, variation_key: variant.variation.key, filename: variant.filename)

Installation

Add this line to your application's Gemfile:

gem "active_storage_proxy", github: "michelada/active_storage_proxy"

And then execute:

$ bundle
# config/environments/production.rb
config.active_storage_proxy.proxy_urls_expire_in = 1.year
config.active_storage_proxy.proxy_urls_public = true

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.