2

I have set the active storage configuration to use AWS S3 in production.rb, It's working fine for one bucket, but now the requirement is I wanted to use a different bucket for a specific upload. In other words I want to change the default configuration in middle of a specific uploader action.

Is it possible to achieve it?

Christopher Oezbek
  • 23,994
  • 6
  • 61
  • 85
  • It seems that isn't possible with ActiveStorage directly: https://stackoverflow.com/questions/49160670/using-multiple-buckets-with-activestorage You might want to use a AWS S3 Gem for such a specific upload. – Christopher Oezbek Dec 20 '21 at 16:46

1 Answers1

0

You can define an ENV or credentials for your different buckets and use it dynamically based on actions