Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix(download): increase capacity to download
Marc Seitz093b15419a74
diff --git a/pages/api/links/download/bulk.ts b/pages/api/links/download/bulk.tsindex 4a1535ee..f671df17 100644--- a/pages/api/links/download/bulk.ts+++ b/pages/api/links/download/bulk.ts@@ -13,6 +13,10 @@ import {getMimeTypeFromSupportedType,} from "@/lib/utils/get-content-type";+export const config = {+ maxDuration: 180,+};+const s3Client = getS3Client();const s3Service = new S3DownloadService(s3Client);diff --git a/pages/api/links/download/index.ts b/pages/api/links/download/index.tsindex a500cce4..2c6374f5 100644--- a/pages/api/links/download/index.ts+++ b/pages/api/links/download/index.ts@@ -29,6 +29,7 @@ export default async function handle(},document: {select: {+ teamId: true,versions: {where: { isPrimary: true },select: {@@ -82,6 +83,15 @@ export default async function handle(data: { downloadedAt: new Date() },});+ // TODO: team hardcode for special download+ if (+ view.document!.teamId === "clwt1qwt00000qz39aqra71w6" &&+ view.document!.versions[0].type === "sheet"+ ) {+ const downloadUrl = view.document!.versions[0].file;+ return res.status(200).json({ downloadUrl });+ }+const downloadUrl = await getFile({type: view.document!.versions[0].storageType,data: view.document!.versions[0].file,