I'm getting a content-length 411 error. The variables in completeMultipartUpload are all valid, as well as their structure. The issue is the content-length header: Here's the error:
S3 Error: Error executing "CompleteMultipartUpload" on "https://v5l2.da.idrivee2-25.com/etc..."; AWS HTTP error: Client error: POST https://v5l2.da.idrivee2-25.com/lightvault-dev/0oTKAVReHXVwUuG?uploadId=582eab69-c4f6-47e0-9022-7df4b2702108
resulted in a 411 Length Required
response:
MissingContentLength
You must provide the Content-Len (truncated...)MissingContentLength (client): You must provide the Content-Length HTTP header. -
MissingContentLength
You must provide the Content-Length HTTP header.0oTKAVReHXVwUuGlightvault-dev/lightvault-dev/0oTKAVReHXVwUuG1780D527E55D2DBAdc178504-d6ed-4ffa-859f-95f1758bdcd1
Request ID: 1780D527E55D2DBA
Error Type: client
Error Code: MissingContentLength
// Complete the multipart upload
$result = $s3->completeMultipartUpload([
'Bucket' => $bucket,
'Key' => $key,
'UploadId' => $uploadId,
'Parts' => $parts
]);
if ($result->get('@metadata')['HTTPStatusCode'] == 200) {
echo "success";
} else {
echo $result->get('Error')['Message'];
}