Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: upload arraybuffer on desktop builds for attachments

Abdullah Atta52adece147a0
diff --git a/apps/web/src/interfaces/fs.ts b/apps/web/src/interfaces/fs.ts
index 62066048b..34be135a7 100644
--- a/apps/web/src/interfaces/fs.ts
+++ b/apps/web/src/interfaces/fs.ts
@@ -265,9 +265,11 @@ async function singlePartUploadFile(
url: uploadUrl,
method: "PUT",
headers: {
- "Content-Type": "application/octet-stream"
+ "Content-Type": ""
},
- data: await fileHandle.toBlob(),
+ data: IS_DESKTOP_APP
+ ? await (await fileHandle.toBlob()).arrayBuffer()
+ : await fileHandle.toBlob(),
signal,
onUploadProgress: (ev) =>
reportProgress(