From d45cefbc2041ec2513965873c88b8779d45da366 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Sat, 23 May 2026 20:54:29 +0200 Subject: [PATCH] =?UTF-8?q?E-Mail=20Anhang-Download=20=C3=BCber=20API-Clie?= =?UTF-8?q?nt=20laden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KI-AGENT: Der Attachment-Download nutzt jetzt den zentralen API-Client mit apiBase, damit keine Frontend-HTML-Seite mehr als PDF gespeichert wird. --- frontend/pages/email/index.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/pages/email/index.vue b/frontend/pages/email/index.vue index d7930af..635cf5b 100644 --- a/frontend/pages/email/index.vue +++ b/frontend/pages/email/index.vue @@ -456,12 +456,8 @@ async function moveSelectedMessage() { async function downloadAttachment(attachment: NonNullable[number]) { actionLoading.value = `attachment-${attachment.id}` try { - const response = await $fetch.raw(`/api/email/attachments/${attachment.id}/download`, { + const response = await $api.raw(`/api/email/attachments/${attachment.id}/download`, { responseType: "arrayBuffer", - credentials: "include", - headers: { - ...(useCookie("token").value ? { Authorization: `Bearer ${useCookie("token").value}` } : {}), - }, }) const contentType = response.headers.get("content-type") || attachment.contentType || "application/octet-stream" const blob = new Blob([response._data as ArrayBuffer], { type: contentType })