3.0.0 #220

Merged
flfeders merged 676 commits from dev into main 2026-09-20 16:10:48 +00:00
Showing only changes of commit d45cefbc20 - Show all commits

View File

@@ -456,12 +456,8 @@ async function moveSelectedMessage() {
async function downloadAttachment(attachment: NonNullable<EmailMessage["attachments"]>[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 })