What I want to do is to check the actual file type
Try accessing files[0].type property . See Using files from web applications
$("#imageLoader"":file").on("change", function(e) { var file = e.target.files[0]; console.log(filethis.files[0].type); }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <input type='file' id='imageLoader' name='imageLoader' accept="image/*" data-type='image' />