aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
2.96k stars 556 forks source link

Specify ContentLength for part uploads #6131

Closed f8k8 closed 2 weeks ago

f8k8 commented 1 month ago

Issue

4767

Description

The UploadPartCommand is passed the original parameters, which may include ContentLength. If the ContentLength is included in the original parameters, and the upload is larger than a single chunk, UploadPartCommand has an incorrect value for ContentLength. This change passes the actual size of the chunk as ContentLength, or makes sure it is undefined if the part size is not calculated.

Testing

After upgrading from SDK v2 to v3, our uploads were hanging and eventually timing out. Making this change in our local copy of the SDK fixed the uploads.

Additional context

Checklist


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

github-actions[bot] commented 2 days ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.