createFileInput |
function [optional] A function to create an element that
uploads a file. By default this is a normal <input type="file">
with an extra show member function that does nothing.
The function takes two parameters: uploadFn and doneFn.
uploadFn must be called when a file has been chosen for upload;
it takes two parameters: a File object and a callback function that is
called on completion. You should either pass doneFn as this
second parameter, or a function that performs some actions then
calls doneFn() itself. The return value of createFileInput
should be the element itself, monkey-patched to include a show()
method that will be called when the Load button is clicked.
|