react-qiniu
React Component to upload file to Qiniu
See Demo: http://lenage.com/react-qiniu/
Usage
Just require('react-qiniu')
and specify an onDrop
method that accepts an array of dropped files and pass your Qiniu token
as prop.
You can also specify a style object to apply to the Drop Zone. Optionally pass in a size property to configure the size of the Drop Zone.
var React = ;var Qiniu = ; var ReactQiniuDemo = React; React;
when upload, we will add a promise
to file object, see index.js,
so, you can deal with this promise to handle upload status. (do something when success/failure)
see more in example/app.js
Contributing
- Fork it ( https://github.com/lingochamp/react-qiniu/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Thanks
License
MIT