title: How to use Gaufrette to upload and store an image into S3 without using the bundle?
body: <p>I found this <a href="http://knplabs.com/blog/give-your-projects-a-gaufrette" rel="nofollow noreferrer">http://knplabs.com/blog/give-your-projects-a-gaufrette</a></p>
  
  <p>and the code sample it provides is </p>
  
  <pre><code>&lt;?php
  
  $amazon = new AmazonS3('myKey', 'mySecretKey', 'myToken');
  $adapter = new Gaufrette\Adapter\AmazonS3($amazon, 'my_bucket');
  $filesystem = new Gaufrette\Filesystem($adapter);
  
  if ( ! $filesystem-&gt;has('foo')) {
      $filesystem-&gt;write('foo', 'Some content');
  }
  
  echo $filesystem-&gt;read('foo');
  </code></pre>
  
  <p>This does not appear to be writing an image file.</p>
  
  <p>I also found <a href="https://stackoverflow.com/questions/14591076/gaufrette-upload-image-and-store-in-amazons3">Gaufrette upload image and store in AmazonS3</a></p>
  
  <p>but the answer appears to be leaning towards using Gaufrette bundle for Symfony. </p>
  
  <p>I am not using Symfony, so I am hoping for a good example I can use to upload images to S3 via Gaufrette.</p>
  
  <p>Thank you.</p>