Skip to content

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

chore: extend maxduration for download function

Marc Seitzf25c0fdec286
diff --git a/pages/api/links/download/dataroom-document.ts b/pages/api/links/download/dataroom-document.ts
index f9771609..deda7809 100644
--- a/pages/api/links/download/dataroom-document.ts
+++ b/pages/api/links/download/dataroom-document.ts
@@ -10,7 +10,7 @@ import { getFileNameWithPdfExtension } from "@/lib/utils";
import { getIpAddress } from "@/lib/utils/ip";
export const config = {
- maxDuration: 180,
+ maxDuration: 300,
};
export default async function handle(
diff --git a/pages/api/links/download/index.ts b/pages/api/links/download/index.ts
index d9dea18c..08786476 100644
--- a/pages/api/links/download/index.ts
+++ b/pages/api/links/download/index.ts
@@ -8,6 +8,11 @@ import prisma from "@/lib/prisma";
import { getFileNameWithPdfExtension } from "@/lib/utils";
import { getIpAddress } from "@/lib/utils/ip";
+// This function can run for a maximum of 300 seconds
+export const config = {
+ maxDuration: 300,
+};
+
export default async function handle(
req: NextApiRequest,
res: NextApiResponse,