W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2009

[whatwg] Expose event.dataTransfer.files accessor to allow file drag and drop

From: Thomas Broyer <t.broyer@gmail.com>
Date: Wed, 10 Jun 2009 12:30:06 +0200
Message-ID: <a9699fd20906100330q6bb77352o5dbf9bbae7454ec0@mail.gmail.com>
On Wed, Jun 10, 2009 at 10:37 AM, Adam Barth wrote:
> SUMMARY
>
> Currently the <input> element exposes selected files via a "files"
> accessor (i.e., as in https://developer.mozilla.org/En/NsIDOMFileList
> and http://www.w3.org/TR/file-upload/). ?We should add a similar
> accessor to event.dataTransfer to enable drag-and-drop of files onto
> web pages.
[...]
> Alternative APIs include getData('File'), as defined in
> http://msdn.microsoft.com/en-us/library/ms537658(VS.85).aspx.
> However, it does not appear that IE ever implemented this API. ?(Also,
> note that IE doesn't follow HTML 5's clipboard security model.)
> Mozilla has an equivalent API in
> event.dataTransfer.mozGetDataAt("application/x-moz-file", 0).

It should be noted also that Adobe AIR has
getData("application/x-vnd.adobe.air.file-list") [1] and Gears
(starting with 0.5.21.0, as announced at Google I/O) has its own (not
yet documented) API with a "files" property [2] (as requested here).


[1] http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS7709855E-7162-45d1-8224-3D4DADC1B2D7.html
[2] http://code.google.com/p/gears/source/browse/trunk/gears/test/manual/drag_and_drop.html#109

-- 
Thomas Broyer
Received on Wednesday, 10 June 2009 03:30:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:13 UTC