From 9b3f60ffdefb5cf2b75d31140847f4f7311297ea Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 5 Mar 2024 13:56:12 +0100 Subject: [PATCH] fix(web): prettify album download filename (#7637) fix(server): pretify download filename --- web/src/lib/utils/asset-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts index 92c87e4661..94f451c3c1 100644 --- a/web/src/lib/utils/asset-utils.ts +++ b/web/src/lib/utils/asset-utils.ts @@ -59,8 +59,8 @@ export const downloadArchive = async (fileName: string, options: DownloadInfoDto for (let index = 0; index < downloadInfo.archives.length; index++) { const archive = downloadInfo.archives[index]; - const suffix = downloadInfo.archives.length === 1 ? '' : `+${index + 1}`; - const archiveName = fileName.replace('.zip', `${suffix}-${DateTime.now().toFormat('yyyy-LL-dd-HH-mm-ss')}.zip`); + const suffix = downloadInfo.archives.length > 1 ? `+${index + 1}` : ''; + const archiveName = fileName.replace('.zip', `${suffix}-${DateTime.now().toFormat('yyyyLLdd_HHmmss')}.zip`); const key = getKey(); let downloadKey = `${archiveName} `;