Skip to content

Commit 81eb03a

Browse files
authored
@tus/s3-store: add missing docs for maxMultipartParts (#720)
1 parent af6a55a commit 81eb03a

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.changeset/thin-keys-whisper.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tus/s3-store": patch
3+
---
4+
5+
Add missing documentation for `maxMultipartParts` option added in #712

packages/s3-store/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Examples](#examples)
1515
- [Example: using `credentials` to fetch credentials inside a AWS container](#example-using-credentials-to-fetch-credentials-inside-a-aws-container)
1616
- [Example: use with Cloudflare R2](#example-use-with-cloudflare-r2)
17+
- [Example: use with Scaleway Object Storage](#example-use-with-scaleway-object-storage)
1718
- [Types](#types)
1819
- [Compatibility](#compatibility)
1920
- [Contribute](#contribute)
@@ -74,7 +75,14 @@ by setting `partSize` and `minPartSize` to the same value.
7475
Can not be lower than 5MiB or more than 5GiB.
7576

7677
The server calculates the optimal part size, which takes this size into account, but
77-
may increase it to not exceed the S3 10K parts limit.
78+
may increase it to not exceed the `options.maxMultipartParts` parts limit.
79+
80+
#### `options.maxMultipartParts`
81+
82+
The maximum number of parts allowed in a multipart upload. Defaults to 10,000.
83+
Some S3 providers have non-standard restrictions on the number of parts in a multipart
84+
upload. For example, AWS S3 has a limit of 10,000 parts, but some S3 compatible providers
85+
have a limit of 1,000 parts.
7886

7987
#### `options.s3ClientConfig`
8088

@@ -226,6 +234,17 @@ const s3Store = new S3Store({
226234
})
227235
```
228236

237+
### Example: use with Scaleway Object Storage
238+
239+
`@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.
240+
241+
```ts
242+
const s3Store = new S3Store({
243+
maxMultipartParts: 1000,
244+
// ...
245+
})
246+
```
247+
229248
## Types
230249

231250
This package is fully typed with TypeScript.

0 commit comments

Comments
 (0)