From e5d2ba87e81ec857c5bf4d6d1d8b83875f994646 Mon Sep 17 00:00:00 2001 From: enes Date: Thu, 15 Aug 2024 16:44:53 +0200 Subject: [PATCH] fix(verify-page): export (download) files now includes files The issue was noticed on the windows machine, removing forward slash made it work --- src/pages/verify/index.tsx | 2 +- src/utils/file.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/verify/index.tsx b/src/pages/verify/index.tsx index 934efaf..b5628db 100644 --- a/src/pages/verify/index.tsx +++ b/src/pages/verify/index.tsx @@ -421,7 +421,7 @@ export const VerifyPage = () => { for (const [fileName, pdf] of Object.entries(files)) { const pages = await addMarks(pdf.file, marksByPage) const blob = await convertToPdfBlob(pages) - zip.file(`/files/${fileName}`, blob) + zip.file(`files/${fileName}`, blob) } const arrayBuffer = await zip diff --git a/src/utils/file.ts b/src/utils/file.ts index 94308d5..619ecff 100644 --- a/src/utils/file.ts +++ b/src/utils/file.ts @@ -15,7 +15,7 @@ const getZipWithFiles = async ( for (const [fileName, pdf] of Object.entries(files)) { const pages = await addMarks(pdf.file, marksByPage) const blob = await convertToPdfBlob(pages) - zip.file(`/files/${fileName}`, blob) + zip.file(`files/${fileName}`, blob) } return zip