In order to support custom route path for activestorage a new option called active_storage.mount_path can be implemented. The default value for this option can be ‘/storage’ to keep consistency with other rails’s frameworks such as ‘/cable’ for actioncable.
I’ve made a patch implementing this feature. You can check it here https://gist.github.com/aganov/b91893915d23f3d2ca491a90db60cef3
rails_service_blob GET /storage/blobs/:signed_id/*filename(.:format) active_storage/blobs#show
rails_blob_representation GET /storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show
rails_disk_service GET /storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show
update_rails_disk_service PUT /storage/disk/:encoded_token(.:format) active_storage/disk#update
rails_direct_uploads POST /storage/direct_uploads(.:format) active_storage/direct_uploads#create
config.active_storage.mount_path = “/storage123”
rails_service_blob GET /storage123/blobs/:signed_id/*filename(.:format) active_storage/blobs#show
rails_blob_representation GET /storage123/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations#show
rails_disk_service GET /storage123/disk/:encoded_key/*filename(.:format) active_storage/disk#show
update_rails_disk_service PUT /storage123/disk/:encoded_token(.:format) active_storage/disk#update
rails_direct_uploads POST /storage123/direct_uploads(.:format) active_storage/direct_uploads#create
Thanks!
Alex