SteveSanderson/knockout — pull request #853 by pawosty (2013-02-19 23:23:58+00:00)
Title: Bind HTML 5 input type 'file'

The HTML 5 'file' input type exposes a [FileList](https://developer.mozilla.org/en-US/docs/DOM/FileList) object through a 'files' attribute, allowing the user-chosen files to be accessible through an API. In those cases, the 'value' attribute is simply a string of the path of the selected file, and (in my opinion) isn't very useful.

Therefore, I added a small change to selectExtensions.js to read the 'files' attribute where applicable.

I'd like to also note that I didn't change the write behavior. As pointed out in another [pull request](https://github.com/SteveSanderson/knockout/pull/851), writing to the value attribute for a file input generally isn't allowed, however writing an *empty string* to the value attribute is allowed and is how one can [programmatically clear the list of user-chosen files](http://stackoverflow.com/questions/3144419/how-do-i-remove-a-file-from-the-filelist).

Since I want to do that in the application I'm working on, I let things be, however this does mean that if someone tries to set values other than undefined, null, or an empty string on an observable, they'll get some unhelpful browser errors.