title: Detect WebM mime type in PHP with Fileinfo
body: <p>My code use the <a href="http://www.php.net/manual/en/book.fileinfo.php" rel="nofollow">FileInfo</a> extension to detect file mime-type.</p>
  
  <pre><code>$finfo = new finfo();
  $mimetype = $finfo-&gt;file($filename, FILEINFO_MIME);
  </code></pre>
  
  <p>This works well for most files I tested. However, it doesn't works for WebM file. I understand that FileInfo uses a <em>magic file</em> database. The same than the one used by the <code>file</code> command which is also unable to detect WebM mime type (on the same system).</p>
  
  <p>I guess it should be possible to add WebM support to this <em>magic file</em>, but how?</p>