small refactorings and fixes

This commit is contained in:
zadam
2023-06-29 23:32:19 +02:00
parent 48029cea7c
commit eb34f9c64f
45 changed files with 78 additions and 188 deletions

View File

@@ -63,7 +63,7 @@ function register(router) {
throw new eu.EtapiError(400, "ATTACHMENT_IS_PROTECTED", `Attachment '${req.params.attachmentId}' is protected and content cannot be read through ETAPI.`);
}
const filename = utils.formatDownloadTitle(attachment.title, attachment.type, attachment.mime);
const filename = utils.formatDownloadTitle(attachment.title, attachment.role, attachment.mime);
res.setHeader('Content-Disposition', utils.getContentDisposition(filename));