diff --git a/.changeset/thin-keys-whisper.md b/.changeset/thin-keys-whisper.md new file mode 100644 index 00000000..85204efe --- /dev/null +++ b/.changeset/thin-keys-whisper.md @@ -0,0 +1,5 @@ +--- +"@tus/s3-store": patch +--- + +Add missing documentation for `maxMultipartParts` option added in #712 diff --git a/packages/s3-store/README.md b/packages/s3-store/README.md index b56b7cae..d2f30883 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) @@ -74,7 +75,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 1,000 parts. #### `options.s3ClientConfig` @@ -226,6 +234,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 1,000 parts in a multipart upload. + +```ts +const s3Store = new S3Store({ + maxMultipartParts: 1000, + // ... +}) +``` + ## Types This package is fully typed with TypeScript.