Supporting Multiple Buckets within a service

17 views
Skip to first unread message

Nerdture

unread,
Dec 2, 2019, 9:41:50 PM12/2/19
to Ruby on Rails: Core
Is there a workaround to configure a specific attachment to use a different bucket?

I see with this PR that you can provide a different service, but I am not seeing anything that allows for different buckets to be passed.

My use case is that in my app I am processing files that will be used within the app (and shouldn't be accessible publicly), but also generating images that need to be shared outside the app (public).  I want to store the private files in one bucket and the public images in a separate, aws cloudfront connected bucket.

Even when the pull request gets fully released, I don't know it will support my use case.

Is there a recommended way of storing files in two different buckets on the same service?


George Claghorn

unread,
Dec 2, 2019, 10:05:18 PM12/2/19
to Ruby on Rails: Core
Even when the pull request gets fully released, I don't know it will support my use case.

It will. In 6.1, you’ll be able to configure two services that use the same service adapter (S3) and different buckets. Then you can specify which one to use on a per-attachment basis.

Nerdture

unread,
Dec 2, 2019, 10:40:16 PM12/2/19
to Ruby on Rails: Core
It will. In 6.1, you’ll be able to configure two services that use the same service adapter (S3) and different buckets.

Great news!  Thanks for your insight! 

Tom Rossi

unread,
Dec 3, 2019, 9:55:14 AM12/3/19
to rubyonra...@googlegroups.com
Will there be a solution for "public" buckets? So you don't even need the pre-signed URL?

On Mon, Dec 2, 2019 at 10:40 PM Nerdture <jos...@1stdayschoolsupplies.com> wrote:
It will. In 6.1, you’ll be able to configure two services that use the same service adapter (S3) and different buckets.

Great news!  Thanks for your insight! 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/1b16dc12-5969-498a-9a2a-cefc14cb4402%40googlegroups.com.

George Claghorn

unread,
Dec 3, 2019, 9:57:36 AM12/3/19
to Ruby on Rails: Core
Yes, that’s in master, too.

Tom Rossi

unread,
Dec 3, 2019, 10:00:11 AM12/3/19
to rubyonra...@googlegroups.com
Woo hoo! Thanks everyone!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages