package
drag and drop file uploading with a single drop event
npm install component-dropGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Drag and drop upload component providing each drop as a single event for easy filtering and custom precedence.
$ component install component/drope.items array.string for string related itemsThe e.items array contains File objects for file uploads,
and regular objects for string related drops.
var drop = require('drop')
var el = document.querySelector('#drop')
drop(el, function(e){
var items = e.items
items.forEach(function(item){
console.log(item)
})
})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 item.entry.fullPath.
kind "file"lastModifiedDatename filenamesize file sizetype mime typeentry FileEntry objectDropping strings or urls results in objects with the following properties:
kind "string"type mime typestring valueMIT
Registry package owners.
Estimated unpacked size across 8 packages.
4.7 kB
Includes dependencies.
3 direct dependencies.