Oscar Oscar - 10 months ago 26
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
if (jQuery('#File1').val()) { /* There are files */ }