Simple drag and drop file handler.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
lib
.gitignore
.npmignore
.travis.yml
LICENSE.md
README.md
makefile
package.json

README.md

dubdrop

Simple drag and drop file handler.

Progressively enhances file inputs to allow for dragging and dropping of files and running each file through async tasks.

Usage

var dubdrop = require('dubdrop');

var exampleInput = dubdrop('#file-input', {
    'tasks': [
        function readFile (file) {
            var reader = new FileReader();

            reader.onload = function (e) {
                console.log(file.name, ' loaded');
                console.log(e.target.result);
            };

            reader.readAsText(file);
        }
    ]
});

Contributing

Running example:

npm start