1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

fix: lint after PM-13923 (#12164)

This commit is contained in:
Andreas Coroiu
2024-11-27 12:00:46 +01:00
committed by GitHub
parent 5a6d5f5887
commit f71d42e051

View File

@@ -9,21 +9,21 @@ export class BitwardenFileUploadService {
) { ) {
const fd = new FormData(); const fd = new FormData();
if (Utils.isBrowser) { if (Utils.isBrowser) {
const blob = new Blob([encryptedFileData.buffer], { type: "application/octet-stream" }); const blob = new Blob([encryptedFileData.buffer], { type: "application/octet-stream" });
fd.append("data", blob, encryptedFileName); fd.append("data", blob, encryptedFileName);
} else if (Utils.isNode) { } else if (Utils.isNode) {
fd.append( fd.append(
"data", "data",
Buffer.from(encryptedFileData.buffer) as any, Buffer.from(encryptedFileData.buffer) as any,
{ {
filename: encryptedFileName, filename: encryptedFileName,
contentType: "application/octet-stream", contentType: "application/octet-stream",
} as any, } as any,
); );
} else { } else {
throw new Error("Unsupported environment"); throw new Error("Unsupported environment");
} }
await apiCall(fd); await apiCall(fd);
} }