Commit 13d4c84
fix(upload-client/multipart): set custom chunk size for multipart (#531)
* fix(upload-client/multipart): set custom chunk size when starting multipart upload
If a multipart upload is started with a custom part size, the part size must be set in the request to `/multipart/start/` via `part_size`. Otherwise, the default 5 MB part size is used, which causes the subsequent request to `/multipart/complete/` to fail with the following error:
```
{
"error":
{
"status_code": 400,
"content": "Can not complete upload. Wrong parts size?",
"error_code": "MultipartFileCompletionFailedError"
}
}
```
* test: add test for multipartChunkSize
---------
Co-authored-by: nd0ut <[email protected]>1 parent 89191cd commit 13d4c84
File tree
2 files changed
+11
-1
lines changed- packages/upload-client
- src/uploadFile
- test/uploadFile
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| |||
0 commit comments