From f27364301162fdf46f7633c3e897af8c1cb7d7c8 Mon Sep 17 00:00:00 2001 From: liuguancen Date: Thu, 2 Apr 2026 13:29:02 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=89=8D=E7=AB=AF]=20=E4=BF=AE=E5=A4=8DPDF?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=EF=BC=9A=E6=AD=A3=E7=A1=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?downloadFile=E8=BF=94=E5=9B=9E=E7=9A=84blob=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chat_web_front/src/views/reading/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chat_web_front/src/views/reading/index.vue b/chat_web_front/src/views/reading/index.vue index 612851a..540543c 100644 --- a/chat_web_front/src/views/reading/index.vue +++ b/chat_web_front/src/views/reading/index.vue @@ -437,8 +437,9 @@ const loadPdfFile = async () => { if (!selectedFile.value) return; docHtml.value = ''; try { - const blob = await downloadFile({ fileId: selectedFile.value.fileId }); - const arrayBuffer = await (blob as Blob).arrayBuffer(); + const resp = await downloadFile({ fileId: selectedFile.value.fileId }); + const blob = new Blob([resp]); + const arrayBuffer = await blob.arrayBuffer(); pdfData.value = arrayBuffer; } catch (e: any) { pdfData.value = null;