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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user