diff --git a/libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts b/libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts index 9a7b9a89823..93594405302 100644 --- a/libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts +++ b/libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts @@ -9,21 +9,21 @@ export class BitwardenFileUploadService { ) { const fd = new FormData(); - if (Utils.isBrowser) { - const blob = new Blob([encryptedFileData.buffer], { type: "application/octet-stream" }); - fd.append("data", blob, encryptedFileName); - } else if (Utils.isNode) { - fd.append( - "data", - Buffer.from(encryptedFileData.buffer) as any, - { - filename: encryptedFileName, - contentType: "application/octet-stream", - } as any, - ); - } else { - throw new Error("Unsupported environment"); - } + if (Utils.isBrowser) { + const blob = new Blob([encryptedFileData.buffer], { type: "application/octet-stream" }); + fd.append("data", blob, encryptedFileName); + } else if (Utils.isNode) { + fd.append( + "data", + Buffer.from(encryptedFileData.buffer) as any, + { + filename: encryptedFileName, + contentType: "application/octet-stream", + } as any, + ); + } else { + throw new Error("Unsupported environment"); + } await apiCall(fd); }