Skip to content

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

fix: base64 images getting saved as null bytes

thecodrrf45ed3d37bab
diff --git a/apps/web/src/interfaces/fs.js b/apps/web/src/interfaces/fs.js
index 30e995e1c..d51c28a3f 100644
--- a/apps/web/src/interfaces/fs.js
+++ b/apps/web/src/interfaces/fs.js
@@ -89,7 +89,10 @@ async function writeEncrypted(filename, { data, type, key }) {
const { hash, type: hashType } = await hashBuffer(data);
if (!filename) filename = hash;
- const file = new File([data], filename, { type });
+ const file = new File([data.buffer], filename, {
+ type: "application/octet-stream",
+ });
+
const result = await writeEncryptedFile(file, key, hash);
return {
...result,