Oscar Oscar - 1 year ago 54
Javascript Question

How to check an input type="file" has a file or not using jquery?

I have a file upload control

<input id="File1" type="file" />
in my page... How to check an input type="file" has a file or not using jquery on click of a button
upload
?

Answer Source
if (jQuery('#File1').val()) { /* There are files */ }