title: How to determine MIME type of copy-pasted image clipboard?
body: <p>Can I assume that Mac OS X clipboard image data is png?</p>
  
  <p>When I try to MIME-detect the clipboard data, it returns <code>application/octet</code>.</p>
  
  <p>This has the undesirable effect of causing every browser to download the image rather than display it.</p>
  
  <p>If I force the content-type to image/png, everything seems fine, but I wondered if there is a way for me to not have to make the assumption?</p>
  
  <pre><code>$log.debug(e.originalEvent.clipboardData);
  for (var i = 0; i &lt; e.originalEvent.clipboardData.items.length; i++) {
  var item = e.originalEvent.clipboardData.items[i];
  $log.info("Item type: " ,item);
  if (item.type.indexOf("image") != -1) {
      $scope.token.images = [];
      $log.debug(item.getAsFile(), {});
  ...
  </code></pre>
  
  <p>I use <a href="https://github.com/broofa/node-mime" rel="nofollow">https://github.com/broofa/node-mime</a> to detect MIME types.</p>