From 9675f83f9a6f625b3a9f53c58965085b4fb7bf96 Mon Sep 17 00:00:00 2001 From: Mitja P Date: Mon, 10 Feb 2025 14:52:10 +0100 Subject: [PATCH 1/6] @tus/s3-store: upade documentation --- packages/s3-store/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/s3-store/README.md b/packages/s3-store/README.md index b56b7cae..df5d31e3 100644 --- a/packages/s3-store/README.md +++ b/packages/s3-store/README.md @@ -74,7 +74,14 @@ by setting `partSize` and `minPartSize` to the same value. Can not be lower than 5MiB or more than 5GiB. The server calculates the optimal part size, which takes this size into account, but -may increase it to not exceed the S3 10K parts limit. +may increase it to not exceed the `options.maxMultipartParts` parts limit. + +#### `options.maxMultipartParts` + +The maximum number of parts allowed in a multipart upload. Defaults to 10,000. +Some S3 providers have non-standard restrictions on the number of parts in a multipart +upload. For example, AWS S3 has a limit of 10,000 parts, but some S3 compatible providers +have a limit of 1000 parts. #### `options.s3ClientConfig` @@ -226,6 +233,17 @@ const s3Store = new S3Store({ }) ``` +### Example: use with Scaleway Object Storage + +`@tus/s3-store` can be used with Scaleway Object Storage but with some additional configuration. Scaleway Object Storage has a limit of 1000 parts in a multipart upload. + +```ts +const s3Store = new S3Store({ + maxMultipartParts: 1000, + // ... +}) +``` + ## Types This package is fully typed with TypeScript. From 341ce52f4d82c98e7194b14c815c32b71f6e7e29 Mon Sep 17 00:00:00 2001 From: Mitja P Date: Mon, 10 Feb 2025 15:20:02 +0100 Subject: [PATCH 2/6] fix number formatting --- packages/s3-store/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/s3-store/README.md b/packages/s3-store/README.md index df5d31e3..c8de63c3 100644 --- a/packages/s3-store/README.md +++ b/packages/s3-store/README.md @@ -81,7 +81,7 @@ may increase it to not exceed the `options.maxMultipartParts` parts limit. The maximum number of parts allowed in a multipart upload. Defaults to 10,000. Some S3 providers have non-standard restrictions on the number of parts in a multipart upload. For example, AWS S3 has a limit of 10,000 parts, but some S3 compatible providers -have a limit of 1000 parts. +have a limit of 1,000 parts. #### `options.s3ClientConfig` From 185f63cadc8bfbd00c99c0f7601fbf5d87b4d80a Mon Sep 17 00:00:00 2001 From: Mitja P Date: Mon, 10 Feb 2025 15:25:02 +0100 Subject: [PATCH 3/6] update changeset --- .changeset/thin-keys-whisper.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/thin-keys-whisper.md diff --git a/.changeset/thin-keys-whisper.md b/.changeset/thin-keys-whisper.md new file mode 100644 index 00000000..a446c51b --- /dev/null +++ b/.changeset/thin-keys-whisper.md @@ -0,0 +1,5 @@ +--- +"@tus/s3-store": patch +--- + +Update documentation From 6dc5290b3f8476e1fcf4c12e5baf7ce97e28d064 Mon Sep 17 00:00:00 2001 From: Mitja P Date: Mon, 10 Feb 2025 15:26:56 +0100 Subject: [PATCH 4/6] update TOC --- packages/s3-store/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/s3-store/README.md b/packages/s3-store/README.md index c8de63c3..395a34cc 100644 --- a/packages/s3-store/README.md +++ b/packages/s3-store/README.md @@ -14,6 +14,7 @@ - [Examples](#examples) - [Example: using `credentials` to fetch credentials inside a AWS container](#example-using-credentials-to-fetch-credentials-inside-a-aws-container) - [Example: use with Cloudflare R2](#example-use-with-cloudflare-r2) + - [Example: use with Scaleway Object Storage](#example-use-with-scaleway-object-storage) - [Types](#types) - [Compatibility](#compatibility) - [Contribute](#contribute) From 3f83024638db26b35522f9bcb52498654c0e146b Mon Sep 17 00:00:00 2001 From: Mitja P Date: Mon, 10 Feb 2025 15:28:12 +0100 Subject: [PATCH 5/6] update number formatting --- packages/s3-store/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/s3-store/README.md b/packages/s3-store/README.md index 395a34cc..d2f30883 100644 --- a/packages/s3-store/README.md +++ b/packages/s3-store/README.md @@ -236,7 +236,7 @@ const s3Store = new S3Store({ ### Example: use with Scaleway Object Storage -`@tus/s3-store` can be used with Scaleway Object Storage but with some additional configuration. Scaleway Object Storage has a limit of 1000 parts in a multipart upload. +`@tus/s3-store` can be used with Scaleway Object Storage but with some additional configuration. Scaleway Object Storage has a limit of 1,000 parts in a multipart upload. ```ts const s3Store = new S3Store({ From 280a6d4600f596f8bd2f3f3a57acbbdc80067b25 Mon Sep 17 00:00:00 2001 From: Mitja P Date: Mon, 10 Feb 2025 15:28:31 +0100 Subject: [PATCH 6/6] Update .changeset/thin-keys-whisper.md Co-authored-by: Merlijn Vos --- .changeset/thin-keys-whisper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/thin-keys-whisper.md b/.changeset/thin-keys-whisper.md index a446c51b..85204efe 100644 --- a/.changeset/thin-keys-whisper.md +++ b/.changeset/thin-keys-whisper.md @@ -2,4 +2,4 @@ "@tus/s3-store": patch --- -Update documentation +Add missing documentation for `maxMultipartParts` option added in #712