Supporting Multiple Buckets within a service

瀏覽次數:17 次
跳到第一則未讀訊息

Nerdture

未讀,
2019年12月2日 晚上9:41:502019/12/2
收件者: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

未讀,
2019年12月2日 晚上10:05:182019/12/2
收件者: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

未讀,
2019年12月2日 晚上10:40:162019/12/2
收件者: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

未讀,
2019年12月3日 上午9:55:142019/12/3
收件者: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

未讀,
2019年12月3日 上午9:57:362019/12/3
收件者:Ruby on Rails: Core
Yes, that’s in master, too.

Tom Rossi

未讀,
2019年12月3日 上午10:00:112019/12/3
收件者: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.
回覆所有人
回覆作者
轉寄
0 則新訊息