drag and drop file uploading with a single drop event
Drag and drop upload component providing each drop as a single event for easy filtering and custom precedence.
$ component install component/drop
- normalizes all items and files into a single
.stringfor string related items
- walks directories (webkit only)
e.items array contains
File objects for file uploads,
and regular objects for string related drops.
var drop = require'drop'var el = documentquerySelector'#drop'dropelvar items = eitemsitemsforEachconsole.logitem
Dropping files results in
File objects with the following properties. When
file(s) are uploaded via dropping a directory the
.entry property is populated
which allows you to reference
Dropping strings or urls results in objects with the following properties: