https://github.com/jamsinclair/ascender
[WIP] Lightweight utilities to support drag'n'drop upload
https://github.com/jamsinclair/ascender
Last synced: 19 days ago
JSON representation
[WIP] Lightweight utilities to support drag'n'drop upload
- Host: GitHub
- URL: https://github.com/jamsinclair/ascender
- Owner: jamsinclair
- License: mit
- Created: 2017-09-14T03:30:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-07T08:43:04.000Z (almost 5 years ago)
- Last Synced: 2025-02-14T08:35:54.663Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 291 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ascender
> A collection of light utilities to support Drag'n'Drop uploads.
## Usage
Template:
```html
Drop files or click to upload
```JavaScript:
```js
import { DropZone } from 'ascender';const instance = DropZone(document.querySelector('.dropzone'));
instance.on('fileadded', file => {
console.log(`${file.name} - ${file.type} - ${file.size} bytes`);
});
```## Examples
- [Basic usage](https://githubbox.com/jamsinclair/ascender/tree/master/examples/basic)
- [Accepting files of only certain types](https://githubbox.com/jamsinclair/ascender/tree/master/examples/accept-files)
- [Showing image preview](https://githubbox.com/jamsinclair/ascender/tree/master/examples/image-preview)---
Inspired by:
- [Dropzone.js](http://www.dropzonejs.com)
- [Draggable](https://github.com/shopify/draggable)