-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add beforeStart support, close #17 #19
Conversation
const props = this.props; | ||
if (props.beforeStart) { | ||
const before = props.beforeStart(file); | ||
before.then && before.then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(before && before.then){
before.then(() => {
this.post(file);
});
} else if(before !== false) {
this.post(file);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里改了
feat: add beforeStart support, close #17
ok |
@@ -73,6 +74,22 @@ const AjaxUploader = React.createClass({ | |||
} | |||
}, | |||
|
|||
upload(file) { | |||
const props = this.props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beforeUpload无法阻挡onStart的执行
No description provided.