drop-file-dataurl
Module for creating a drop area where people can drop files and you will get
the data-uri as a callback. Install it with npm install drop-file-dataurl
.
This is created for the use with Browserify.
Usage
droparea callback check
where the dataURL is passed to the callback
.
The optional check
function
takes the File object
and the return value determines whether the second callback will be fired or not.
This is useful for mime-type filtering.
Example
Simple Usage
var dropfile = var droparea = document
Usage with check
Run an example
If you have beefy
installed, you can run an example with
npm run example
(see examples
folder).