title: Alternative to Files.probeContentType?
body: <p>In a web project, users upload their files, but when I receive them on the server, they are being stored as .tmp files rather than their original file extension (this is my preferred behavior as well).</p>
  
  <p>However, this is causing a problem with <code>Files.probeContentType()</code>. While locally for me, on my Linux dev machine, <code>Files.probeContentType()</code> works correctly and does determine the right mime type, when I upload my project to the production server (amazon beanstalk), it doesn't seem to correctly determine the mime type.</p>
  
  <p>From reading the javadocs, it seems that the implementation of <code>Files.probeContentType()</code> are different, and I think that on production server, it is reading the file extension and so, is unable to determine the content type.</p>
  
  <p>What's a good, and quick alternative to <code>Files.probeContentType()</code> which will accept a <code>File</code> argument and return a string like <code>image/png</code> as the resulting mime type?</p>