1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(web): prettify album download filename (#7637)

fix(server): pretify download filename
This commit is contained in:
waclaw66 2024-03-05 13:56:12 +01:00 committed by GitHub
parent a5d19bc945
commit 9b3f60ffde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,8 +59,8 @@ export const downloadArchive = async (fileName: string, options: DownloadInfoDto
for (let index = 0; index < downloadInfo.archives.length; index++) { for (let index = 0; index < downloadInfo.archives.length; index++) {
const archive = downloadInfo.archives[index]; const archive = downloadInfo.archives[index];
const suffix = downloadInfo.archives.length === 1 ? '' : `+${index + 1}`; 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 archiveName = fileName.replace('.zip', `${suffix}-${DateTime.now().toFormat('yyyyLLdd_HHmmss')}.zip`);
const key = getKey(); const key = getKey();
let downloadKey = `${archiveName} `; let downloadKey = `${archiveName} `;