Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: add expiration period
Marc Seitz4229b2cf0938
diff --git a/pages/api/file/tus/[[...file]].ts b/pages/api/file/tus/[[...file]].tsindex c4f26a93..79d41340 100644--- a/pages/api/file/tus/[[...file]].ts+++ b/pages/api/file/tus/[[...file]].ts@@ -23,7 +23,7 @@ const tusServer = new Server({respectForwardedHeaders: true,datastore: new S3Store({partSize: 8 * 1024 * 1024, // each uploaded part will have ~8MiB,- // expirationPeriodInMilliseconds: 1000 * 60 * 60 * 3, // 3 hours+ expirationPeriodInMilliseconds: 1000 * 60 * 60 * 3, // 3 hourss3ClientConfig: {bucket: process.env.NEXT_PRIVATE_UPLOAD_BUCKET as string,region: process.env.NEXT_PRIVATE_UPLOAD_REGION as string,@@ -47,9 +47,6 @@ const tusServer = new Server({generateUrl(req, { proto, host, path, id }) {// Encode the ID to be URL safeid = Buffer.from(id, "utf-8").toString("base64url");- console.log("proto", proto);- // INFO: hardcoding the protocol to https for now - https://github.com/tus/tus-node-server/issues/635- proto = process.env.NODE_ENV === "development" ? "http" : "https";return `${proto}://${host}${path}/${id}`;},getFileIdFromRequest(req) {