1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-06 23:51:28 +01: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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}