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:
parent
5a6d5f5887
commit
f71d42e051
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user