Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var React = require('react');
var ReactDOM = require('react-dom')
var request = require('superagent-bluebird-promise');

var PropTypes = require('prop-types');
var isFunction = function (fn) {
var getType = {};
return fn && getType.toString.call(fn) === '[object Function]';
Expand All @@ -24,20 +24,20 @@ function formatMaxSize(size){
var ReactQiniu = React.createClass({
// based on https://github.com/paramaggarwal/react-dropzone
propTypes: {
onDrop: React.PropTypes.func.isRequired,
token: React.PropTypes.string.isRequired,
onDrop: PropTypes.func.isRequired,
token: PropTypes.string.isRequired,
// called before upload to set callback to files
onUpload: React.PropTypes.func,
size: React.PropTypes.number,
style: React.PropTypes.object,
supportClick: React.PropTypes.bool,
accept: React.PropTypes.string,
multiple: React.PropTypes.bool,
onUpload: PropTypes.func,
size: PropTypes.number,
style: PropTypes.object,
supportClick: PropTypes.bool,
accept: PropTypes.string,
multiple: PropTypes.bool,
// Qiniu
uploadUrl: React.PropTypes.string,
prefix: React.PropTypes.string,
uploadUrl: PropTypes.string,
prefix: PropTypes.string,
//props to check File Size before upload.example:'2Mb','30k'...
maxSize:React.PropTypes.string,
maxSize: PropTypes.string
},

getDefaultProps: function() {
Expand Down
87 changes: 87 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"license": "MIT",
"dependencies": {
"bluebird": "^3.0.0",
"prop-types": "^15.5.10",
"superagent": "^1.2.0",
"superagent-bluebird-promise": "^3.0.2"
},
Expand Down