Re: [whatwg] related subject -- access to local files RE: Forms: <input type=file> and directory tree picking

(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@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

Received on Wednesday, 2 October 2013 22:51:53 UTC