[Feature]: Expose username {{user}} for templates #1619
Replies: 5 comments
|
User ID is already used and is automatically prepended to the storage template, so it's actually not possible to mix photos between users. They will always be in separate directories. |
|
But that is hard coded and not exposed, right? (perhaps I should have worded that better) The more advanced implementation I mentioned could allow for some differences between username and storage direction, but I imagine some care would be taken here so 2 users don't end up with the same storage (probably not desirable?). I am not sure how storage verification is being done do avoid duplicates, but could the {{user}} part be in the middle of the string? Must it be the initial directory or can it be in the middle or even be part of the filename? I am assuming it must be the first item of the dynamic name or else other things could break. Other things like {{user}} can only show once and if removed it will be automatically added to the left of the string in a format of {{user}} would make sense too. |
|
I see. So this request is to make it possible to include (move) user somewhere else in the template and/or omit it entirely? |
|
That would be the final goal but only the easiest use cases should be implemented for now. Doing it all may require multiple different issues tracking it, exposing {{user}} would probably be the first step. |
|
Reviving this as it would be an awesome feature. My entire library follows a format like |
Uh oh!
There was an error while loading. Please reload this page.
Feature detail
It would be good to make {{user}} available in the template configuration to enable the separation of photos better when having multiple users.
This would allow some configurations like:
{{user}}/{{y}}/{{MM}}/{{filename}}
While I have not looked at the code, implementing this should be easier than trying more complex solutions.
The more complex solution could have a configurable parameter attached to the user profile (defined by the admin, possibly pulled in from an SSO parameter). If this is empty, it could fall back to the username.
Platform
Web
All reactions