An open API service indexing awesome lists of open source software.

https://github.com/nikku/file-drops

A simple in-browser file drop utility.
https://github.com/nikku/file-drops

file-drop

Last synced: 3 months ago
JSON representation

A simple in-browser file drop utility.

Awesome Lists containing this project

README

          

# file-drops

A simple in-browser file drop utility.

## Usage

```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);
```

## Styling

On drop over, the utility will attach the following overlay to the
element for which the drop handler got registered:

```html



{label}



```

Style it as you wish. :heart:

## See also

* [file-open](https://github.com/nikku/file-open) - simple file open utility

## License

MIT