Skip to content

Build your personal knowledge base with Trilium Notes

fix auto-download of images, closes #4566

zadam4e549baedc99
diff --git a/src/services/notes.js b/src/services/notes.js
index 6e6bbfd76f..7062d1aee8 100644
--- a/src/services/notes.js
+++ b/src/services/notes.js
@@ -494,7 +494,7 @@ async function downloadImage(noteId, imageUrl) {
const title = path.basename(parsedUrl.pathname);
const imageService = require('../services/image');
- const {attachment} = imageService.saveImageToAttachment(noteId, imageBuffer, title, true, true);
+ const attachment = imageService.saveImageToAttachment(noteId, imageBuffer, title, true, true);
imageUrlToAttachmentIdMapping[imageUrl] = attachment.attachmentId;