Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YongZL committed Sep 19, 2023
1 parent 61e1ace commit 2b66def
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ const ViewVerification: FC<VerificationManagementController.ViewVerificationMana
const zip = new JSZip();
let folderName = "";

fileList.forEach((file) => {
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);
Expand Down

0 comments on commit 2b66def

Please sign in to comment.