Fix missing zip extension when filename had a dot

while exporting mediafiles, the zip extension was missing if the file
name hat a dot
This commit is contained in:
Sean 2021-07-19 16:01:00 +02:00
parent f86f8ec9b4
commit bf7eba603d
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();