Skip to content

Commit

Permalink
fix(lib-storage): ignore overall data content-length for UploadPart o…
Browse files Browse the repository at this point in the history
…peration (#6131)

* Specify ContentLength for part uploads

* Fix spacing

* fix(lib-storage): ignore overall data content-length for UploadPart operation
  • Loading branch information
f8k8 authored Jun 14, 2024
1 parent 3682a43 commit fbfce55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/lib-storage/src/Upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ export class Upload extends EventEmitter {
const partResult = await this.client.send(
new UploadPartCommand({
...this.params,
// dataPart.data is chunked into a non-streaming buffer
// so the ContentLength from the input should not be used for MPU.
ContentLength: undefined,
UploadId: this.uploadId,
Body: dataPart.data,
PartNumber: dataPart.partNumber,
Expand Down

0 comments on commit fbfce55

Please sign in to comment.