Hey Adnan, thanks for the post, for S3 service I just solved it this way:
# lib/active_storage/service/tenant_s3_service.rb # extend s3 service require 'active_storage/service/s3_service' module ActiveStorage class Service::TenantS3Service < Service::S3Service private def object_for(key) current_tenant = Apartment::Tenant.current bucket.object File.join(current_tenant, key) end end end
Then:
amazon: service: TenantS3
That awesome 🤩 !
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Adnan, thanks for the post, for S3 service I just solved it this way:
Then:
That awesome 🤩 !