Skip to content

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

fix: download media before publishing note

thecodrr667128567968
diff --git a/packages/core/api/monographs.js b/packages/core/api/monographs.js
index 1f0e93db5..da701c0d9 100644
--- a/packages/core/api/monographs.js
+++ b/packages/core/api/monographs.js
@@ -66,7 +66,10 @@ class Monographs {
const note = this._db.notes.note(noteId);
if (!note) throw new Error("No such note found.");
- const content = await this._db.content.raw(note.data.contentId);
+ const content = await this._db.content.downloadMedia(
+ `monograph-${noteId}`,
+ await this._db.content.raw(note.data.contentId)
+ );
if (!content) throw new Error("This note has no content.");
const monograph = {