A simple in-browser file drop utility
npm install file-dropsA simple in-browser file drop utility.
``javascript
import fileDrop from 'file-drops';
const element = document.querySelector('#container');
const dropHandler = fileDrop('Drop a file', function(files) {
// files = [ { name, contents }, ... ]
});
element.addEventListener('dragover', dropHandler);
`
On drop over, the utility will attach the following overlay to the
element for which the drop handler got registered:
`html``
Style it as you wish. :heart:
* file-open - simple file open utility
MIT