title: Set ACL on file_put_contents using PHP AWS SDK
body: <pre><code>require 'vendor/autoload.php';
  
  use Aws\S3\S3Client;
  
  $client = S3Client::factory(array(
      'key'    =&gt; 'MY_KEY',
      'secret' =&gt; 'MY_SECRET'
  ));
  
  // Register the stream wrapper from a client object
  $client-&gt;registerStreamWrapper();
  
  $data = $_POST["image_data"];
  
  list($type, $data) = explode(';', $data);
  list(, $data)      = explode(',', $data);
  $data = base64_decode($data);
  
  file_put_contents('s3://webcamapp/filename.png', $data);
  </code></pre>
  
  <p>This code works fine and dandy and I'm seeing my images upload to my bucket. But I need to set the ACL to public-read as I'm sending this file to S3 because I will be displaying the images on my website. I can't figure out a way to do it using this method. Ideas?</p>