psugand / CodeIgniter-S3

Amazon S3 Library for CodeIgniter
http://prashant.es
241 stars 115 forks source link

Amazon Server Side Encryption #4

Closed musdy closed 10 years ago

musdy commented 12 years ago

$input = $this->s3->inputFile($pathToFile);

$this->s3->putObject($input, S3BUCKET, "data/form.json" , S3::ACL_PUBLIC_READ,array("x-amz-server-side​-encryption"=>"AES256"));

Doing this to encrypt data on Amazon S3 bucket, I receive:

Message: S3::putObject(): [SignatureDoesNotMatch] The request signature we calculated does not match the signature you provided. Check your key and signing method.

When i change my code to:

$this->s3->putObject($input, S3BUCKET, "data/form.json" , S3::ACL_PUBLIC_READ);

Everything is back to normal. Any idea?