|
14 | 14 | - [Examples](#examples)
|
15 | 15 | - [Example: using `credentials` to fetch credentials inside a AWS container](#example-using-credentials-to-fetch-credentials-inside-a-aws-container)
|
16 | 16 | - [Example: use with Cloudflare R2](#example-use-with-cloudflare-r2)
|
| 17 | + - [Example: use with Scaleway Object Storage](#example-use-with-scaleway-object-storage) |
17 | 18 | - [Types](#types)
|
18 | 19 | - [Compatibility](#compatibility)
|
19 | 20 | - [Contribute](#contribute)
|
@@ -74,7 +75,14 @@ by setting `partSize` and `minPartSize` to the same value.
|
74 | 75 | Can not be lower than 5MiB or more than 5GiB.
|
75 | 76 |
|
76 | 77 | 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. |
78 | 86 |
|
79 | 87 | #### `options.s3ClientConfig`
|
80 | 88 |
|
@@ -226,6 +234,17 @@ const s3Store = new S3Store({
|
226 | 234 | })
|
227 | 235 | ```
|
228 | 236 |
|
| 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 | + |
229 | 248 | ## Types
|
230 | 249 |
|
231 | 250 | This package is fully typed with TypeScript.
|
|
0 commit comments