W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2008

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

From: timeless <timeless@gmail.com>
Date: Sun, 23 Mar 2008 12:33:22 +0200
Message-ID: <26b395e60803230333r2e583371u814313b3a5a095dd@mail.gmail.com>
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
Received on Sunday, 23 March 2008 03:33:22 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:40 UTC