Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: bulk download
Marc Seitz74837c2f4030
diff --git a/pages/api/links/download/bulk.ts b/pages/api/links/download/bulk.tsindex 00029710..0d9ea8a0 100644--- a/pages/api/links/download/bulk.ts+++ b/pages/api/links/download/bulk.ts@@ -232,6 +232,15 @@ export default async function handle((doc) => doc.document.versions[0].storageType !== "VERCEL_BLOB",);+ folderDocs &&+ folderDocs.forEach((doc) =>+ addFileToStructure(+ folder.path,+ doc.document.name,+ doc.document.versions[0].file,+ ),+ );+// If the folder is empty, ensure it's still added to the structureif (folderDocs && folderDocs.length === 0) {addFileToStructure(folder.path, "", "");