W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: New FileAPI Draft | was Re: FileAPI feedback

From: Gregg Tavares <gman@google.com>
Date: Wed, 5 Aug 2009 16:10:31 -0700
Message-ID: <de4bd3190908051610n3328dbe3r51d5a14a5b3ef0f8@mail.gmail.com>
To: arun@mozilla.com
Cc: Dmitry Titov <dimich@chromium.org>, Web Applications Working Group WG <public-webapps@w3.org>
How about this?

Why make a new API for getting the contents of a file (local or otherwise)
when we already have one which is XHR?

What if FileList was just array of File objects where each File object is
just a URL in the format

"filedata: uuid, filename"

Then you can use that URL anywhere in HTML a URL is valid. script, img,
audio, video, css, AND XHR

That would mean you wouldn't be adding a new API to get the contents of a
file. If you want the contents just use XHR and use the URL from the File in
the FileList.

You could add a few more functions to XHR like request.getAsDataURL(),
request.getAsTextInEncodiing(), etc. if need be if they are needed
Received on Wednesday, 5 August 2009 23:11:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:33 GMT