I want to upload all my files in Amazon s3 server using php.But i faced the problem
SignatureDoesNotMatch The request signature we calculated does not match thesignature you provided. Check your key and signingmethod.7FBB6739881D275CRLoFhnjK621A7bwXE7W3NOcPQvw=50 55 54 0a 0a 76 69 64 656f 2f 78 2d 6d 73 2d 77 6d 76 0a 57 65 64 2c 20 30 38 20 4f 63 74 20 32 30 3038 20 31 33 3a 30 30 3a 30 31 20 47 4d 54 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 7072 69 76 61 74 65 0a 78 2d 61 6d 7a 2d 73 65 63 75 72 69 74 79 2d 74 6f 6b 656e 3a 7b 55 73 65 72 5………………………………………………{Long numeric characters}
But i got the solution by inserting the content type in putObject
$requestHeaders = array(
‘Content-Type’ => ‘application/octet-stream’,
‘Content-Disposition’ => ‘attachment; filename=${filename}’
);
$params = S3::getHttpUploadPostParams(
$bucket,
$path,
S3::ACL_PUBLIC_READ,
$lifetime,
$maxFileSize,
201, // Or a URL to redirect to on success
$metaHeaders,
$requestHeaders,
false // False since we’re not using flash
);