Merge pull request #6172 from tsiegleauq/zip-export-dot

Fix missing zip extension when filename had a dot
This commit is contained in:
Sean 2021-07-19 16:30:29 +02:00 committed by GitHub
commit 73f98ff55e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -147,7 +147,7 @@ export class MediafileRepositoryService extends BaseIsListOfSpeakersContentObjec
}
}
const archive = await zip.generateAsync({ type: 'blob' });
saveAs(archive, archiveName);
saveAs(archive, `${archiveName}.zip`);
}
public getDirectoryBehaviorSubject(): BehaviorSubject<ViewMediafile[]> {

View File

@ -461,9 +461,6 @@ export class MediafileListComponent extends BaseListViewComponent<ViewMediafile>
}
public downloadMultiple(mediafiles: ViewMediafile[] = this.dataSource.source): void {
/**
* TODO: naming the files is discussable
*/
const eventName = this.configService.instant<string>('general_event_name');
const dirName = this.directory?.filename ?? this.translate.instant('Files');
const archiveName = `${eventName} - ${dirName}`.trim();