In most browsers, an input type="file" has the following files property:
document.getElementById("my-input").files
This can be used to detect a file is uploaded, and get the file. However, it looks like the files attribute doesn't exist in IE9.
Added:
In jQuery, you can do...
$("#my-input").val()
to read the file name. What about getting the files contents?
Use jQuery and this plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With