Storage Template
Storage Templates let admins control how uploaded files are organized on disk. This is useful if you want a predictable folder structure for backups or external tools. Changes apply to new uploads by default, and you can run a migration to move existing assets into the new layout.
Admin-only
For now, Storage Templates are admin-only. If you do not see the settings, ask your server admin to configure them.
Where to find it
Open Settings → Server → Storage Template in the web or mobile app.
Default layout
Year/Month/ChecksumPrefix/Checksum.Extension
Trellilume ships with a default template that keeps the checksum-based layout.
How templates work
Templates are strings with variables enclosed in {{...}}. You can mix
variables and custom text to build a path.
Example:
{{y}}/{{MM}}/{{filename}}.{{ext}}
Conditionals (optional)
You can use simple conditionals:
{{#if album}}{{album}}{{else}}Other{{/if}}/{{filename}}.{{ext}}
Variables
Supported variables include:
- Date/time:
{{y}},{{yy}},{{MM}},{{MMM}},{{MMMM}},{{d}},{{dd}},{{H}},{{HH}},{{h}},{{hh}},{{m}},{{mm}},{{s}},{{ss}},{{SSS}},{{WW}} - File:
{{filename}},{{ext}},{{filetype}},{{filetypefull}} - Identity:
{{asset_id}},{{user_id}},{{storage_label}} - Content:
{{album}},{{checksum}},{{checksum_prefix}}
The storage label is an optional per-user label that defaults to the user ID if left blank.
Preview and validation
Use the Preview button in settings to confirm the final path before saving. Invalid templates will show errors.
Applying changes to existing assets
Template changes only affect new uploads. To backfill existing assets, run Migration from the Storage Template settings. This moves files on disk and updates the database paths.
Safety notes
- Changing templates moves files on disk. Ensure you have backups.
- Large libraries can take time to migrate.
- If multiple assets resolve to the same filename, Trellilume appends a numeric suffix to keep names unique.