Skip to content

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

core: always use attachment mime type from backup if possible

Abdullah Attaa3464255ece3
diff --git a/packages/core/src/database/backup.js b/packages/core/src/database/backup.js
index e6357f1e2..4835619fb 100644
--- a/packages/core/src/database/backup.js
+++ b/packages/core/src/database/backup.js
@@ -276,6 +276,10 @@ export default class Backup {
if (attachment) {
item = {
...attachment,
+ metadata: {
+ ...attachment.metadata,
+ type: item.metadata.type || attachment.metadata.type
+ },
noteIds: setManipulator.union(attachment.noteIds, item.noteIds)
};
} else {