shiki-uploader
v1.1.2
Published
[![Build Status](https://travis-ci.com/shikimori/shiki-uploader.svg?branch=master)](https://travis-ci.com/shikimori/shiki-uploader)
Downloads
2,362
Readme
shiki-uploader
Used to upload files to shikimori.
Usage
import ShikiUploader from 'shiki-uploader';
new ShikiUploader({ node: document.querySelector('.attach-to'), ...options })
.on('upload:file:success', (_e, { response }) => (
console.log(response.html);
));
@import './node_modules/shiki-uploader/index.sass';
Default options
const defaultOptions = {
node: null,
progressContainerNode: null,
locale: null,
xhrEndpoint: null,
xhrHeaders: () => ({}),
xhrFieldName: 'image',
maxNumberOfFiles: 150,
isResetAfterUpload: true
}
Events
upload
file-added
upload-success
upload-progress
upload-error
complete
restriction-failed
Package release command
GITHUB_TOKEN=... npm run release