Direct upload
For Rails Active Storage direct upload disk all that is needed is:
# config/importmap.rb pin "@rails/activestorage", to: "activestorage.esm.js"
// app/javascript/application.js import * as ActiveStorage from "@rails/activestorage" ActiveStorage.start()
<%= form.file_field :attachments, multiple: true, direct_upload: true %>
however if you do AWS s3 you need https://blog.eq8.eu/til/rails-activestorage-aws-s3-bucket-policy-permissions.html