mirror of
https://github.com/bitwarden/browser
synced 2026-01-05 18:13:26 +00:00
[fix] Force send attachment to always download and never open (#2908)
* [refactor] Introduce a file download service * [refactor] Point platformUtilsService.saveFile() callers to fileDownloadService.download() instead * [refactor] Remove platformUtilsService.saveFile() * [fix] Force send attachments to always download and never open * [fix] Remove the window property from FileDownloadRequest * [fix] Move FileDownloadRequest to /abstractions/fileDownload * [fix] Simplify FileDownloadRequest to a type * [fix] Move BrowserApi.saveFile logic into BrowserFileDownloadService * [fix] Use proper blob types for file downloads * [fix] forceDownload -> downloadMethod on FileDownloadRequest * [fix] Remove fileType from FileDownloadRequest * [fix] Make fileType private
This commit is contained in:
@@ -5,6 +5,7 @@ import { ActivatedRoute } from "@angular/router";
|
||||
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
||||
import { EventService } from "@bitwarden/common/abstractions/event.service";
|
||||
import { ExportService } from "@bitwarden/common/abstractions/export.service";
|
||||
import { FileDownloadService } from "@bitwarden/common/abstractions/fileDownload/fileDownload.service";
|
||||
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
||||
import { LogService } from "@bitwarden/common/abstractions/log.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
||||
@@ -28,7 +29,8 @@ export class OrganizationExportComponent extends ExportComponent {
|
||||
policyService: PolicyService,
|
||||
logService: LogService,
|
||||
userVerificationService: UserVerificationService,
|
||||
formBuilder: FormBuilder
|
||||
formBuilder: FormBuilder,
|
||||
fileDownloadService: FileDownloadService
|
||||
) {
|
||||
super(
|
||||
cryptoService,
|
||||
@@ -39,7 +41,8 @@ export class OrganizationExportComponent extends ExportComponent {
|
||||
policyService,
|
||||
logService,
|
||||
userVerificationService,
|
||||
formBuilder
|
||||
formBuilder,
|
||||
fileDownloadService
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user