[ActiveStorage] Use different services for different attachments in the same app

Hello,

Rails 5.2
Is it possible or is there a plan to support multiple services on a single app?
Say I configure these S3 services:
amazon_1:
service: S3

bucket: first-bucket
amazon_2:
service: S3

bucket: second-bucket
How would I access both buckets in the app?
Currently I can only see how to use one bucket per app.
I guess you could extend this question with, can I use an azure service and a google service in the same app?

Thanks for your time,

-Mordecai

Hello,

Did you get anywhere with this?

According to what I have been reading, it is currently not possible to handle multiple services per environment in a single app.

This should be a feature request.

Cheers,

Lucas.

Hi Lucas!

I have a PR for that - https://github.com/rails/rails/pull/34935, but it hasn’t been reviewed yet :frowning:

Great!

Let me know if you need anything.