E-Mail Anhänge gezielt per IMAP-Part laden
KI-AGENT: Der Anhang-Download lädt jetzt bevorzugt den passenden MIME-Part über die IMAP-BODYSTRUCTURE und bekommt ein Timeout, damit der Download nicht dauerhaft lädt.
This commit is contained in:
@@ -458,6 +458,7 @@ async function downloadAttachment(attachment: NonNullable<EmailMessage["attachme
|
||||
try {
|
||||
const response = await $api.raw(`/api/email/attachments/${attachment.id}/download`, {
|
||||
responseType: "arrayBuffer",
|
||||
timeout: 60_000,
|
||||
})
|
||||
const contentType = response.headers.get("content-type") || attachment.contentType || "application/octet-stream"
|
||||
const blob = new Blob([response._data as ArrayBuffer], { type: contentType })
|
||||
|
||||
Reference in New Issue
Block a user