How to determine MIME type of copy-pasted image clipboard?
问题 Can I assume that Mac OS X clipboard image data is png? When I try to MIME-detect the clipboard data, it returns application/octet . This has the undesirable effect of causing every browser to download the image rather than display it. 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? $log.debug(e.originalEvent.clipboardData); for (var i = 0; i < e.originalEvent.clipboardData.items.length; i++) { var