Spaces CDN with Rails Active Storage

I’m using Active Storage in a Rails 6 application with Spaces. I use “local” file storage for development and Spaces for production. I’d like to use the Spaces CDN feature, which I believe is possible with Active Storage “proxying” the files, but am unsure how to implement it. I’m unable to find a solid tutorial. I’ve followed tutorials suggesting “direct” routes for the CDN, but that doesn’t seem to work if you have different storage locations for different environments. Can anyone point to some setup instructions?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer