E-Mail PDF-Downloads als Binärdaten stabilisieren

KI-AGENT: Attachment-Downloads werden im Backend explizit als Buffer mit Content-Length ausgeliefert und im Frontend aus einem ArrayBuffer als Blob erzeugt, damit PDF-Anhänge unverändert gespeichert werden.
This commit is contained in:
2026-05-23 20:52:22 +02:00
parent 8697810127
commit 4fd2eb9c40
3 changed files with 16 additions and 6 deletions

View File

@@ -668,7 +668,9 @@ export function emailSyncService(server: FastifyInstance) {
return {
filename: attachment.filename || row.attachment.filename || "anhang",
contentType: attachment.contentType || row.attachment.contentType || "application/octet-stream",
content: attachment.content,
content: Buffer.isBuffer(attachment.content)
? attachment.content
: Buffer.from(attachment.content),
}
}
} finally {