title: aws-sdk get file information
body: <p>i am trying to get the file information from a file on my <code>Amazon S3 server</code> using the <code>aws-sdk</code> node module.</p>
  
  <p>What i want to get out is the file name, file type and size.</p>
  
  <p>I have attempted the following methods without luck:</p>
  
  <pre><code>s3.headObject(params, function (err, data) {
      if (err) {
          console.log(err, err.stack)
      }
      else {
          d.resolve(data);
      }
  });
  </code></pre>
  
  <p>And</p>
  
  <pre><code>s3.getObject(params, function (err, data) {
      if (err) {
          console.log(err, err.stack)
      }
      else {
          d.resolve(data);
      }
  });
  </code></pre>
  
  <p>Looking through their documentation i cant seem to find any other method that will give me the information i need.</p>
  
  <p>So my question to you is how do i get the above information?</p>