Skip to content

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

fix: payload size

Marc Seitzb40f716a3cc7
diff --git a/lib/files/tus-upload.ts b/lib/files/tus-upload.ts
index ecc0664a..6087cf51 100644
--- a/lib/files/tus-upload.ts
+++ b/lib/files/tus-upload.ts
@@ -52,7 +52,7 @@ export function resumableUpload({
ownerId: ownerId,
relativePath: relativePath,
},
- chunkSize: 6 * 1024 * 1024,
+ chunkSize: 4 * 1024 * 1024,
onError: (error) => {
console.error("Failed because: " + error);
reject(error);
diff --git a/pages/api/file/tus/[[...file]].ts b/pages/api/file/tus/[[...file]].ts
index 13886b80..6a8c172a 100644
--- a/pages/api/file/tus/[[...file]].ts
+++ b/pages/api/file/tus/[[...file]].ts
@@ -24,7 +24,7 @@ const tusServer = new Server({
// `path` needs to match the route declared by the next file router
path: "/api/file/tus",
datastore: new S3Store({
- partSize: 4.5 * 1024 * 1024, // each uploaded part will have ~8MiB,
+ partSize: 8 * 1024 * 1024, // each uploaded part will have ~8MiB,
s3ClientConfig: {
bucket: process.env.NEXT_PRIVATE_UPLOAD_BUCKET as string,
region: process.env.NEXT_PRIVATE_UPLOAD_REGION as string,