[whatwg] access to local path in input type="file"

timeless timeless at gmail.com
Sun Mar 23 03:33:22 PDT 2008


On Sat, Mar 22, 2008 at 3:16 PM, ddailey <ddailey at zoominternet.net> wrote:
>  Well then I guess FF2.0012 and IE 7 are not considered modern. My FF3
>  installation seems flaky so I can't get it to launch. Opera 9. shows only
>  the leaf but FF2 shows the whole path.

good guess.

http://en.wikipedia.org/wiki/MSIE#Version_7
July 27, 2005 for technical testing... released on January 31, 2006.
so >2 years old.

http://developer.mozilla.org/en/docs/CVS_Tags
Firefox 2 is based on Firefox 1.5, Firefox 1.5 branched August 12, 2005.
So it's even older.

There is an object called DOMFile.
http://mxr.mozilla.org/seamonkey/source/content/base/public/nsIDOMFile.idl#41
which would theoretically let you manipulate the data from a local
file the user gave you.

It looks like you could do:
<input type=file id=a>
<img id=b>
<input type=submit
onclick="document.getElementById("b").src=document.getElementById("a").files[0].getAsDataURL();">

This is of course entirely untested and probably not guaranteed to
work or whatever.

see https://bugzilla.mozilla.org/show_bug.cgi?id=371432 and
http://wiki.mozilla.org/OfflineAppsSummit2006



More information about the whatwg mailing list