Configure s3 storage class with Rails ActiveStorage

By Ryan Romanchuk
On

Pass additional #put(options = {}) params under the upload: key in storage.yml

local:
  service: Disk
  root: <%= Rails.root.join("storage") %>

test:
  service: Disk
  root: <%= Rails.root.join("tmp/storage") %>

amazon:
  service: S3
  bucket: myBucket<%= Rails.env %>
  upload:
    storage_class: INTELLIGENT_TIERING #STANDARD REDUCED_REDUNDANCY INTELLIGENT_TIERING STANDARD_IA ONEZONE_IA GLACIER DEEP_ARCHIVE

This was added in Accept S3 upload options (e.g. server_side_encryption) and added to docs # Add S3 example using server-side encryption but still easy to miss.

talk