title: Why should I use metadata when putting objects in AWS S3?
body: <p>In <a href="http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html" rel="nofollow noreferrer">AWS SDK for PHP v3</a> the method <a href="http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html#putobject" rel="nofollow noreferrer">putObject</a> can receive many parameters like <code>ContentType</code>, <code>ContentEncoding</code>, etc.</p>
  
  <p><a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpPHP.html" rel="nofollow noreferrer">In it's simplest form</a>, I can put a object using only <code>Bucket</code>, <code>Key</code> and <code>SourceFile</code>:</p>
  
  <pre><code>$result = $s3-&gt;putObject(array(
      'Bucket'       =&gt; $bucket,
      'Key'          =&gt; $keyname,
      'SourceFile'   =&gt; $filepath
  ));
  </code></pre>
  
  <p>Considering that my app is going to insert photos and they must stay in S3 until I order to delete it, what are the pros and cons of setting metadata on them, like <code>ContentType</code>, <code>ContentEncoding</code> and others?</p>
  
  <p>Will it's simplest form passing only <code>Bucket</code>, <code>Key</code> and <code>SourceFile</code> attend my goals?</p>