title: JS and type.match as file mime type - need advice
body: <p>Today I faced an interesting thing as FF File API and separate files by their types. OK here is a little snippet as</p>
  
  <pre><code>if (!input.files[0].type.match('image.*')) {
              window.alert("Select image please");
              return;
          }
  </code></pre>
  
  <p>it controls image being read only. But what about doc files and pdf for example? I couldn't find useful examples for this thing so I hope you can share some snippets. The thing I am interested in detecting different file types but how can I control different file types with JS and its type.match bound?</p>
  
  <p><a href="http://www.html5rocks.com/en/tutorials/file/dndfiles/#toc-reading-files" rel="noreferrer">Here</a> is the base code</p>
  
  <p>Any useful comment is appreciated :)</p>