Use a different attachments folder per tenant

While this is not strictly necessary, it can help moving the data of one
tenant to a different server or removing it.

Note we're using subfolders inside the `tenants` subfolder. If we simply
used subfolders with the schema names, if the schema names were, for
instance, language codes like `es`, `en`, `it`, ... they would conflict
with the default subfolders used by Active Storage.
This commit is contained in:
Javi Martín
2022-10-07 19:48:32 +02:00
parent a71f4d87f8
commit 314ce70000
3 changed files with 31 additions and 2 deletions

View File

@@ -1,9 +1,9 @@
local:
service: Disk
service: TenantDisk
root: <%= Rails.root.join("storage") %>
test:
service: Disk
service: TenantDisk
root: <%= Rails.root.join("tmp/storage") %>
# s3: