title: check if the file format is different with the file name extension in Python, Javascript?
body: <p>I have an uploader which has file format validation (only some video formats can be uploaded).</p>
  
  <p>However users can simply change the original file name extension and pass the validation (e.g. rename <code>file.pdf</code> to <code>file.mov</code> and upload)!</p>
  
  <p>Now I need to check and validate if the file format matches the file extension or not. The backend is Python (Django), but I am not sure if this can be done via Payton, Javascript or any other solution.</p>