[whatwg] related subject -- access to local files RE: Forms: <input type=file> and directory tree picking
Glenn Maynard
glenn at zewt.org
Wed Oct 2 15:51:29 PDT 2013
(Dropped CC's, since this isn't really related to the thread you're
replying to.)
On Wed, Oct 2, 2013 at 5:38 PM, David Dailey <ddailey at zoominternet.net>wrote:
> A few years ago, probably on www-html5, I remember posing a question about
> enabling the once-unbroken ability to allow JavaScript with user-consent,
> to
> insert an image file (as the src of an <img> into a web page, viewed in the
> browser).
>
You can access the File object of files selected with <input type=file>
(and similarly with drag-and-drop), create a URL representing it with
URL.createObjectURL, and use that with <img src>.
--
Glenn Maynard
More information about the whatwg
mailing list