1

I need to check if a browser can read file type when the page loads.

With on input change it's:

$('input[name=photo]').change(function(e) {
   var file = e.target.files[0];

   var type = file.type;
   alert(type);
});

But how to check it on page load? I need it because browsers which can't do that can't resize images client side so I'm gonna load the normal upload form on pageload if that's the case.

0 Answers0