jeudi 15 octobre 2015

Amazon aws s3 content header

I am trying to create directory in amazon aws s3 for that I am trying following code ( I am using v3 php sdk)

$bucketName = 'somebucketName';
$key = 'folderName';

$params = [
    'Bucket' => $bucketName,
    'Key' => $key . '/'
  ];
$s3->putObject($params);

$s3 is instance of $s3 = new Aws\S3\S3Client class, I am getting bucket and object successfully with my current configuration.

it was working fine before but now I am getting error

Fatal error: Uncaught exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on "http://ift.tt/1hGgE4r";

AWS HTTP error: Client error: 411 MissingContentLength (client): You must provide the Content-Length HTTP header.




Aucun commentaire:

Enregistrer un commentaire