Drag-and-drop file uploading can be done in Firefox 3.6.
A Google search for html5 drag-and-drop file uploading -gmail gives things like:
- http://stackoverflow.com/questions/2121018/native-drag-drop-file-upload-in-firefox-3-6
- http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload
- http://www.thecssninja.com/javascript/drag-and-drop-upload
All of these guides use FileReader
(or the Firefox 3.6's deprecated getAsBinary
, which no other browser supports, either).
However, Google recently released an update for Gmail that allowed drag-and-drop file uploading in Chromium as well as Firefox, and Chromium does not have FileReader
. I'm using the latest Chromium nightly, and it can drag-drop upload files, while not supporting FileReader
.
I've seen someone mention that drag-drop uploading can be possible by dragging onto an <input type="file" />
, but that can only support one file at a time, while Gmail's uploader can handle multiple files being dragged onto it, so that's clearly not what they're doing.
So the question is, how do they do it? How do you support Chromium for HTML5 file uploading?