views:

261

answers:

0

I've found several tutorials online about implementing file drag/drop with Firefox 3.6 (they involve using a FileReader object to get the file binary data). However, I cannot create a FileReader object in Chrome on Windows or Mac.

Does anyone know what the API is to read and manipulate data from a drag-and-dropped file in Chrome? If I can get the binary data of the file, I already have the rest of the code to perform the upload.

Note: I've also tried using the getAsBinary() function call on the file object of the drag event (event.dataTransfer.file) but I believe that is a Mozilla-specific function and not implemented in Chrome.

Also, I'm not interested in a solution using google gears or one that requires a user to select files from a dialog. I'm specifically trying to implement a drag-and-drop file upload.