Defining an alternate s3 configuration set to `public: true` means we can use it selectively. It sets the objects to `acl: "public-read"` by default (read-only) and means any image tags for those assets can use direct public links in the src attribute (without hitting the ActiveStorage::Representation endpoint). The default non-public service will still be used by default for any other files on instances using s3.
While we migrate from Paperclip to Active Storage, we need to use both
at the same time to avoid any downtime or lost images.
Once the migration is complete, we want to use the same name for
attachment as before. Using Paperclip and Active Storage at the same
time creates a name conflict on a couple of methods.
I'm using alias_method as a temporary solution to access Active Storage
methods. We will remove that after the migration. I declare Paperclip
afterwards so that we have those methods declarations for backwards
compatibility now.
We are re-using the same config used for Paperclip except for disk
storage. Active Storage uses directory sharding on the local disk which
means that we can't create blob entries that point to the existing
Paperclip files. We will just copy them to the standard `storage/`
directory.