Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: bulk downloading

Marc Seitz6aae4688e157
diff --git a/pages/api/links/download/bulk.ts b/pages/api/links/download/bulk.ts
index 4277022b..b57a7c57 100644
--- a/pages/api/links/download/bulk.ts
+++ b/pages/api/links/download/bulk.ts
@@ -8,6 +8,7 @@ import prisma from "@/lib/prisma";
export const config = {
maxDuration: 180,
+ memory: 2048,
};
export default async function handle(
@@ -97,10 +98,10 @@ export default async function handle(
return res.status(404).json({ error: "Error downloading" });
}
- // if viewedAt is longer than 30 mins ago, we should not allow the download
+ // if viewedAt is longer than 23 hours ago, we should not allow the download
if (
view.viewedAt &&
- view.viewedAt < new Date(Date.now() - 30 * 60 * 1000)
+ view.viewedAt < new Date(Date.now() - 23 * 60 * 60 * 1000)
) {
return res.status(403).json({ error: "Error downloading" });
}