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 })