refile / refile-s3

Amazon S3 Backend for Refile
MIT License
36 stars 88 forks source link

Unique S3 Buckets #15

Open superacidjax opened 8 years ago

superacidjax commented 8 years ago

Given I have multiple users, each with a unique Account and each Account has a unique S3 bucket for that account.. How could I designate a specific S3 bucket not inside an initializer? For example, User A has a bucket called user_a_bucket and User XXZX has a bucket called user_xxzx_bucket. Obviously, those can't all go into an initializer. So what's the best strategy to handle that case, given it's not scalable to have each user's bucket names in an initializer.

Thanks!

hiromipaw commented 8 years ago

How about using folders inside the buckets for users? In different applications I have worked on, that was the approach. You could also create buckets on the fly with aws by just passing a new bucket name. In that case that won't be passed in the initialiser, but in the app.

superacidjax commented 8 years ago

Thanks for your comment, but this card is long finished. Each tenant has their own S3 bucket. Carrierwave allows one to override the initializer within an uploader.. So it was rather easy.