mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 04:16:17 +01:00 
			
		
		
		
	correctly save attachment URL, #4566
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user