views:

180

answers:

1

I noticed while using Firefox and Chrome that in gmail I can now simply drag & drop multiple files in a new mail. Then suddenly a bar grows and I can drop the files there and they get uploaded. I think this is html5 functionality.

Does anyone have information about how to implement this? What is needed from html5 and how to handle it server side (.NET).

+1  A: 

The html5 drag&drop feature needs to be implemented only client-side(in browser). After dragging the file into a drop field you could send a http query for uploading the dropped file to the server and the server wouldn't even have a clue that this file was dropped in some way and will treat it as normal file upload query.

I found this great post about html5 drag&drop feature: http://decafbad.com/blog/2009/07/15/html5-drag-and-drop There are even understandable examples for uploading files. I hope it's helpful.

Vladimiroff
It only allows dragging and dropping from within the same window. What I am after is dragging from windows explorer into the browser and there drop it and the uploading starts.
Nyla Pareska
Oh...sorry, I've under checked it. I've never implemented such a feature, but found someone who investigated how did Google exactly make it: http://www.thecssninja.com/javascript/gmail-upload
Vladimiroff