Pablo Fernandez
Pablo Fernandez

Reputation: 105238

Gmail HTML5 Feature to "drop" attachments

I've seen this and I have to admit I'm pretty impressed:


(source: blogspot.com)

http://gmailblog.blogspot.com/2010/04/drag-and-drop-attachments-onto-messages.html

I'm almost certain that this is an HTML 5 feature (it's supported on Chrome and Firefox 3.5), and was wondering if somebody knew how is the browser feature called.

Bonus points for a tutorial/article on how to do something similar!

Upvotes: 4

Views: 1049

Answers (2)

Aaron Wagner
Aaron Wagner

Reputation: 5739

For an HTML5 demo of drag-n-drop, check out:

http://html5demos.com/drag-anything

Seems like dragover, dragenter, dragexit, drop events + event.dataTransfer are how it all works. Putting it together with a multi-part/form ajax POST like the link that dhorn gave is more impressive in my opinion. I would hope that it could be done a little easier than that.

Upvotes: 1

dhorn
dhorn

Reputation: 685

I believe this may be of help:

http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload

Upvotes: 6

Related Questions