feat(server): Shortened asset ID in storage template (#16433)

* Update storage-template.service.ts

* Update supported-variables-panel.svelte

* docs example

* Update storage-template-settings.svelte
This commit is contained in:
Matthew Momjian
2025-02-28 16:04:34 -05:00
committed by GitHub
parent dc143046e3
commit efcf773ea0
4 changed files with 7 additions and 0 deletions

View File

@@ -304,6 +304,7 @@ export class StorageTemplateService extends BaseService {
filetype: asset.type == AssetType.IMAGE ? 'IMG' : 'VID',
filetypefull: asset.type == AssetType.IMAGE ? 'IMAGE' : 'VIDEO',
assetId: asset.id,
assetIdShort: asset.id.slice(-12),
//just throw into the root if it doesn't belong to an album
album: (albumName && sanitize(albumName.replaceAll(/\.+/g, ''))) || '',
};