correctly save attachment URL, #4566

pull/13/head
zadam 2024-01-07 23:51:38 +07:00
parent 4e549baedc
commit 894b08a1b8
1 changed files with 1 additions and 1 deletions

@ -511,7 +511,7 @@ const downloadImagePromises = {};
function replaceUrl(content, url, attachment) {
const quotedUrl = utils.quoteRegex(url);
return content.replace(new RegExp(`\\s+src=[\"']${quotedUrl}[\"']`, "ig"), ` src="api/attachments/${encodeURIComponent(attachment.title)}/image"`);
return content.replace(new RegExp(`\\s+src=[\"']${quotedUrl}[\"']`, "ig"), ` src="api/attachments/${attachment.attachmentId}/image/${encodeURIComponent(attachment.title)}"`);
}
function downloadImages(noteId, content) {