-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multipart upload fails when using SHA1 checksum #2648
Comments
Hi @maloshuk, thanks for opening this issue. I can confirm that this is a bug. The reason for this behavior is because the checksum parameter needs to be provided in the parts that are being sent in the complete upload command, but we can see here that just the partNumber and the eTag parameters are given. protected function handleResult(CommandInterface $command, ResultInterface $result)
{
$this->getState()->markPartAsUploaded($command['PartNumber'], [
'PartNumber' => $command['PartNumber'],
'ETag' => $this->extractETag($result),
]);
} We should have something that would look as follow: protected function handleResult(CommandInterface $command, ResultInterface $result)
{
$this->getState()->markPartAsUploaded($command['PartNumber'], [
'PartNumber' => $command['PartNumber'],
'ETag' => $this->extractETag($result),
'ChecksumSHA1' => $result['ChecksumSHA1']
]);
} Actually, we would need to review which other parameters we should consider to include when completing the upload. I will mark this issue as needs-review so we can address this further. Thanks! |
|
Describe the bug
I'm trying to use SHA1 checksums when uploading files to amazon S3 bucket. It works when I upload small files. But with large files and Multipart Upload, process fails to complete.
Expected Behavior
Upload to AWS S3 bucket with SHA1 checksum algorithm enabled ends with success.
Current Behavior
Upload fails with 400 response code:
400 Bad Request
The upload was created using a sha1 checksum. The complete request must include the checksum for each part. It was missing for part 1 in the request.
Relevant part of the stack trace:
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
SDK version used
3.261.0
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)php 7.4.9, Windows 10, Laravel 8
The text was updated successfully, but these errors were encountered: