Alex Rivera | Logout

Javascript file upload

Asked 2011-05-31T18:22:14.660
9

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?

Edit
Report

1 Answer

4
answered 2011-05-31T18:30:33.957

Your Answer