Skip to content

shikimori/shiki-uploader

Repository files navigation

Build Status

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