inline attachment images into single HTML export

This commit is contained in:
zadam
2023-05-03 23:17:07 +02:00
parent cd01886eb2
commit fbffc6b2b5
3 changed files with 39 additions and 9 deletions

View File

@@ -174,15 +174,14 @@ async function exportToZip(taskContext, branch, format, res, setHeaders = true)
if (attachments.length > 0) {
meta.attachments = attachments
.filter(attachment => ["canvasSvg", "mermaidSvg"].includes(attachment.name))
.map(attachment => ({
name: attachment.name,
title: attachment.title,
role: attachment.role,
mime: attachment.mime,
dataFileName: getDataFileName(
null,
attachment.mime,
baseFileName + "_" + attachment.name,
baseFileName + "_" + attachment.title,
existingFileNames
)
}));