Active Storage is a Rails 5.2 gem that makes it easy to handle file uploads to the storage services. Let’s talk about the actual code you can use to handle file uploads to storage services from Amazon, Google, and Microsoft. Syndicode found for you the tutorial on using Active Storage on Rails 5.2.
This tutorial includes the actual code for migration, active record model, adding attachments and details about configuration of Active Storage.
Follow the link to find the code in the tutorial written by Christopher Rigor.