|
|
|
@ -133,11 +133,10 @@ export class StorageTemplateCore {
|
|
|
|
const substitutions: Record<string, string> = {
|
|
|
|
const substitutions: Record<string, string> = {
|
|
|
|
filename,
|
|
|
|
filename,
|
|
|
|
ext,
|
|
|
|
ext,
|
|
|
|
|
|
|
|
filetype: asset.type == AssetType.IMAGE ? 'IMG' : 'VID',
|
|
|
|
|
|
|
|
filetypefull: asset.type == AssetType.IMAGE ? 'IMAGE' : 'VIDEO',
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const fileType = asset.type == AssetType.IMAGE ? 'IMG' : 'VID';
|
|
|
|
|
|
|
|
const fileTypeFull = asset.type == AssetType.IMAGE ? 'IMAGE' : 'VIDEO';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dt = luxon.DateTime.fromISO(new Date(asset.fileCreatedAt).toISOString());
|
|
|
|
const dt = luxon.DateTime.fromISO(new Date(asset.fileCreatedAt).toISOString());
|
|
|
|
|
|
|
|
|
|
|
|
const dateTokens = [
|
|
|
|
const dateTokens = [
|
|
|
|
@ -153,10 +152,6 @@ export class StorageTemplateCore {
|
|
|
|
substitutions[token] = dt.toFormat(token);
|
|
|
|
substitutions[token] = dt.toFormat(token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Support file type token
|
|
|
|
|
|
|
|
substitutions.filetype = fileType;
|
|
|
|
|
|
|
|
substitutions.filetypefull = fileTypeFull;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return template(substitutions);
|
|
|
|
return template(substitutions);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|