diff --git a/src/services/webPlatformUtils.service.ts b/src/services/webPlatformUtils.service.ts index b2c65b89318..0f52f742806 100644 --- a/src/services/webPlatformUtils.service.ts +++ b/src/services/webPlatformUtils.service.ts @@ -74,7 +74,18 @@ export class WebPlatformUtilsService implements PlatformUtilsService { } saveFile(win: Window, blobData: any, blobOptions: any, fileName: string): void { - // + const blob = new Blob([blobData], blobOptions); + if (navigator.msSaveOrOpenBlob) { + navigator.msSaveBlob(blob, fileName); + } else { + const a = win.document.createElement('a'); + a.href = win.URL.createObjectURL(blob); + a.download = fileName; + a.style.position = 'fixed'; + win.document.body.appendChild(a); + a.click(); + win.document.body.removeChild(a); + } } getApplicationVersion(): string { diff --git a/src/services/webStorage.service.ts b/src/services/webStorage.service.ts index f8f49108c7f..271f2ff926c 100644 --- a/src/services/webStorage.service.ts +++ b/src/services/webStorage.service.ts @@ -24,5 +24,4 @@ export class WebStorageService implements StorageService { window.sessionStorage.removeItem(key); return Promise.resolve(); } - }