A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: make attachment file type optional
thecodrrab0fe3b46c3d
diff --git a/packages/core/collections/attachments.js b/packages/core/collections/attachments.jsindex 1d035e5f7..947658051 100644--- a/packages/core/collections/attachments.js+++ b/packages/core/collections/attachments.js@@ -59,11 +59,12 @@ export default class Attachments extends Collection {!hash ||!hashType ||!filename ||- !type ||!salt ||!key- )+ ) {+ console.error("Attachment invalid:", attachment);throw new Error("Could not add attachment: all properties are required.");+ }const encryptedKey = await this._encryptKey(key);const attachmentItem = {@@ -79,7 +80,7 @@ export default class Attachments extends Collection {hash,hashType,filename,- type,+ type: type || "application/octet-stream",},dateCreated: Date.now(),dateEdited: undefined,