From 0bd2c01591128b4dd1561d9676a14fdf580b12b8 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Sun, 9 Aug 2026 19:33:14 +0200 Subject: [PATCH] =?UTF-8?q?KI-AGENT:=20Exportdateien=20=C3=BCber=20API-Cli?= =?UTF-8?q?ent=20herunterladen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pages/export/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/pages/export/index.vue b/frontend/pages/export/index.vue index 837d348..2baed11 100644 --- a/frontend/pages/export/index.vue +++ b/frontend/pages/export/index.vue @@ -62,13 +62,19 @@ const setupPage = async () => { setupPage() -function downloadFile(row) { +async function downloadFile(row) { + const response = await useNuxtApp().$api.raw(row.url, { + method: "GET", + responseType: "blob" + }) + const objectUrl = URL.createObjectURL(response._data as Blob) const a = document.createElement("a") - a.href = row.url + a.href = objectUrl a.download = row.file_path.split("/").pop() document.body.appendChild(a) a.click() document.body.removeChild(a) + URL.revokeObjectURL(objectUrl) } const showCreateExportModal = ref(false)