Skip to content

Build your personal knowledge base with Trilium Notes

clipper endpoint should also scan and download images as a fallback, #2621

zadam18d439dd44d0
diff --git a/src/routes/api/clipper.js b/src/routes/api/clipper.js
index db6a2068f7..27c876b1ef 100644
--- a/src/routes/api/clipper.js
+++ b/src/routes/api/clipper.js
@@ -144,6 +144,9 @@ function processContent(images, note, content) {
}
}
+ // fallback if parsing/downloading images fails for some reason on the extension side (
+ rewrittenContent = noteService.downloadImages(note.noteId, rewrittenContent);
+
return rewrittenContent;
}
diff --git a/src/services/notes.js b/src/services/notes.js
index df227291db..5609e05824 100644
--- a/src/services/notes.js
+++ b/src/services/notes.js
@@ -949,5 +949,6 @@ module.exports = {
triggerNoteTitleChanged,
eraseDeletedNotesNow,
eraseNotesWithDeleteId,
- saveNoteRevision
+ saveNoteRevision,
+ downloadImages
};