Skip to content

Commit 79b59f7

Browse files
authored
Merge pull request #1931 from mfts/fix/download
chore: extend maxduration for download function
2 parents 02259a2 + f25c0fd commit 79b59f7

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

pages/api/links/download/dataroom-document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getFileNameWithPdfExtension } from "@/lib/utils";
1010
import { getIpAddress } from "@/lib/utils/ip";
1111

1212
export const config = {
13-
maxDuration: 180,
13+
maxDuration: 300,
1414
};
1515

1616
export default async function handle(

pages/api/links/download/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import prisma from "@/lib/prisma";
88
import { getFileNameWithPdfExtension } from "@/lib/utils";
99
import { getIpAddress } from "@/lib/utils/ip";
1010

11+
// This function can run for a maximum of 300 seconds
12+
export const config = {
13+
maxDuration: 300,
14+
};
15+
1116
export default async function handle(
1217
req: NextApiRequest,
1318
res: NextApiResponse,

0 commit comments

Comments
 (0)