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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user