Separate Upload Folders Per Tenant In Multi-Tenant Setup #11967
bruceparish
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From what I've been able to do currently, I can setup multi-tenancy using the plugin and I can also setup uploads with a prefix. However, that prefix appears to only be a static string and can't be dynamic based on who or what tenant is doing the uploading.
I was able to adjust the filename using the custom filename hook outlined in the documentation, but that only allows you to dynamically set the filename but not a folder. Allowing to setup a folder in a hook or allowing the prefix to accept a function would allow me to setup in my storage provider a separate folder per tenant for better organization and could allow some interesting CDN use cases as well as being able to more easily audit high traffic assets by tenant.
My current solution is to adjust the filename in the hook mentioned above and prefix the filename with the uuid of the tenant, but ideally id have a folder with that uuid rather than part of the filename. Specifically, I've been using S3 which I realize doesn't have real folders, but does allow for virtual foldering and any attempt at setting a folder as a part of the filename gets sanitized.
Thanks for consideration.
Beta Was this translation helpful? Give feedback.
All reactions