We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello everyone,
I'm having an issue, i'm trying to upload a file to an amazon s3 server.
$pdf=$rootdir . '/../web/uploads/pdf/'.$reference.'.pdf'; $s3 = $this->container->get('aws_s3'); $bucket = 'my-bucket'; $headers = $s3->get_object_headers($bucket, $pdf); var_dump($headers->header['content-type']); $response = $s3->update_object($bucket, $pdf, array( 'acl' => AmazonS3::ACL_PUBLIC, 'headers' => array( 'Content-Encoding' => 'UTF-8' ), 'meta' => array( 'Cache-Control' => 'Public', 'Max-Age' => '604800', ), )); var_dump($response->isOK());
But always send me this error:
Warning: Cannot unset offset in a non-array variable in /root/dir/to/my/vendor/amazonwebservices/aws-sdk-for-php/services/s3.class.php line 1881
What i'm doing wrong? i take the example from here : http://docs.aws.amazon.com/AWSSDKforPHP/latest/#m=AmazonS3/update_object
Hope someone could help me.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello everyone,
I'm having an issue, i'm trying to upload a file to an amazon s3 server.
$pdf=$rootdir . '/../web/uploads/pdf/'.$reference.'.pdf';
$s3 = $this->container->get('aws_s3');
$bucket = 'my-bucket';
$headers = $s3->get_object_headers($bucket, $pdf);
var_dump($headers->header['content-type']);
$response = $s3->update_object($bucket, $pdf, array(
'acl' => AmazonS3::ACL_PUBLIC,
'headers' => array(
'Content-Encoding' => 'UTF-8'
),
'meta' => array(
'Cache-Control' => 'Public',
'Max-Age' => '604800',
),
));
var_dump($response->isOK());
But always send me this error:
Warning: Cannot unset offset in a non-array variable in /root/dir/to/my/vendor/amazonwebservices/aws-sdk-for-php/services/s3.class.php line 1881
What i'm doing wrong? i take the example from here : http://docs.aws.amazon.com/AWSSDKforPHP/latest/#m=AmazonS3/update_object
Hope someone could help me.
The text was updated successfully, but these errors were encountered: