title: File Mime Type Checking
body: <p>I am allowing uploading of files to my C# MVC website, I am restricting those types based on extension at the moment, but also feel I need a server side check to confirm they haven't just renamed it.</p>
  
  <p>Is there a technique that I can use to check all the types I need or a library I can use that will help here?</p>
  
  <p>I have seen people checking the first few bytes of the file, but I am scared I will miss something?</p>
  
  <p>Thanks for your help.</p>
  
  <p>Edit:</p>
  
  <p>There are a lot of suggestions <a href="https://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature">here</a>. I will investigate some of these as a solution.</p>