I tried Rails new feature ActiveStorage
Rails version is v5.2.0.beta2
Default service is
Disc, and I tried
S3 at this time.
config/storage.ymlstays almost as it is.
mini_magickgem in my
aws-sdk-s3gem to upload to and read from S3.
config.active_storage.service = :amazonin
bin/rails active_storage:installand a migration file copied from active_storage.
- After running
active_storage_blobstables are created.
- Do the same things on README, I could upload images and read the image files from S3.
It seemed to access an image through rails server first, then redirected to S3 (I don’t understand this behaviour.)
I wondered whether I can replace ActiveStorage from Carrierwave or not…
Anyway, this new feature is really helpful and I was impressed with Rails after a long time.