title: PutObject into directory Amazon s3 / PHP
body: <p>I need to upload my files inside specific directories that I created on my amazon s3 storage. I always uploaded the files on the "absolute path" of my bucket doing something like so:</p>
  
  <pre><code>$s3-&gt;putObject(array(
              'Bucket' =&gt; $bucket,
              'ContentType'   =&gt; $mime,
              'Key'           =&gt; $localImage,
              'ACL'           =&gt; 'public-read',
              'SourceFile'    =&gt; $localImage,
              'CacheControl'  =&gt; 'max-age=172800',
              "Expires"       =&gt; gmdate("D, d M Y H:i:s T", strtotime("+5 years")),
              'Metadata'      =&gt; array(
                  'profile' =&gt; $localImage,
              ),
          )); 
  </code></pre>
  
  <p>How can I define where this file should be uploaded on a given directory?</p>