From 2b66defc9ff0edb11fcc34673cec83c928f7c579 Mon Sep 17 00:00:00 2001 From: YongZL <1679963578@qq.com> Date: Tue, 19 Sep 2023 11:37:32 +0800 Subject: [PATCH] fix bug --- .../components/ViewVerification.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/routes/tools/verificationManagement/components/ViewVerification.tsx b/components/routes/tools/verificationManagement/components/ViewVerification.tsx index 94187206..5af8c77c 100644 --- a/components/routes/tools/verificationManagement/components/ViewVerification.tsx +++ b/components/routes/tools/verificationManagement/components/ViewVerification.tsx @@ -16,10 +16,12 @@ const ViewVerification: FC { - folderName = file.fileName.split("/")[0]; - zip.file(file.fileName, file.downloadUrl); - }); + for (const files of fileList) { + folderName = files?.fileName?.split("/")[0]; + const blob = await (await fetch(files.downloadUrl)).blob(); + zip.file(files.fileName, blob); + } + const content = await zip.generateAsync({ type: "blob" }); const link = document.createElement("a"); link.href = URL.createObjectURL(content);