node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



high level client-side module to simplify dropping a file onto a page and reading it as a Buffer


will call the onDrop callback below whenever a file is dropped on the page. if multiple files are dropped at once it will read the first one only.

drop(function onDrop(err, data) {
  console.log('first file dropped on page as a Buffer:', data)