Ask A Question

Notifications

You’re not receiving notifications from this thread.

Set up S3 or DO Spaces for storage, and serve stored images through Cloudfront or other CDN

Ken asked in Rails
Hi all, I'm trying to set up a Rails 5.2 app to directly upload images to Digital Ocean Spaces, and to then serve those images using Cloudfront. I'm able to do direct uploads to Spaces using ActiveStorage following #237, and I've configured Cloudfront as my asset host and everything in app/assets is served from there. But I can't figure out how to get the CDN to serve my images stored on Spaces. I tried nukeproof's workaround here: https://github.com/rails/rails/issues/31419 without success. Any suggestions?
Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.