title: how do I set content-type when creating a signed url for an object in s3 aws?
body: <p>I want to create a signed url with a custom content-type, I was trying this:</p>
  
  <pre><code>s3.getSignedUrl('getObject', {Bucket: AWS_BUCKET_NAME, Key: 'myObjectsKey', ContentType: 'image/png'}, function (err, url) {
      console.log(err, url);
  });
  </code></pre>
  
  <p>however this gives the error:</p>
  
  <pre><code>{ [UnexpectedParameter: Unexpected key 'ContentType' found in params]
    message: 'Unexpected key \'ContentType\' found in params',
    code: 'UnexpectedParameter',
    time: Thu Dec 18 2014 01:38:19 GMT-0400 (AST) }
  </code></pre>
  
  <p>Which I find strange because the documentation on signing requests here:</p>
  
  <p><a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html" rel="noreferrer">http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html</a></p>
  
  <p>states that a signature is made from hashing:</p>
  
  <p>Signature = URL-Encode( Base64( HMAC-SHA1( YourSecretAccessKeyID, UTF-8-Encoding-Of( StringToSign ) ) ) );</p>
  
  <pre><code>StringToSign = HTTP-VERB + "\n" +
      Content-MD5 + "\n" +
      Content-Type + "\n" +
      Expires + "\n" +
      CanonicalizedAmzHeaders +
      CanonicalizedResource;  
  </code></pre>
  
  <p>Which allows you to give a content-type. Does anyone know what's going on?</p>