Re: New FileAPI Draft | was Re: FileAPI feedback

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 UTC