React Lite Uploader
This project is no mature, do not use it in production!
Uploader component from Talk by Teambition.
Based on the work of https://github.com/mailru/FileAPI
Contains internal business logic defined at Talk by Teambition.
npm i --save react-lite-uploader
UploadButton = require('react-lite-uploader').Button UploadArea = require('react-lite-uploader').Area uploadUtil = require('react-lite-uploader').util
UploadArea: React Components
url, string, server url to upload files, required
headers, object of headers, optional
accept, string of accepted types, seperated by commas like
jpg,png, optional, defaults to
multiple, bool, optional, defaults to
onFileHover, function to response to dragging files, optional(only used handling dropping files)
onCreate, function, optional
onProgress, function, optional
onSuccess, function, required
onError, function, required
UploadArea is not suggested due to the lack of flexibility, use
: utilities to handle dropping and pasting uploadUtil
(event, props) ->
(targetElement, props) ->
(files, props) ->
Remember to include
react-lite-uploader/src/styles.css in you project.
page.coffee for details.
Based on Jianliao's project template: