Skip to content
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

Merged
merged 4 commits into from
Sep 29, 2015
Merged

feat: add beforeStart support, close #17 #19

merged 4 commits into from
Sep 29, 2015

Conversation

shepherdwind
Copy link
Contributor

No description provided.

@shepherdwind
Copy link
Contributor Author

cc @xujihui1985 @yiminghe @stonelee

const props = this.props;
if (props.beforeStart) {
const before = props.beforeStart(file);
before.then && before.then(() => {
Copy link
Member

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);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改了

yiminghe added a commit that referenced this pull request Sep 29, 2015
feat: add beforeStart support, close #17
@yiminghe yiminghe merged commit 79c2904 into master Sep 29, 2015
@yiminghe
Copy link
Member

ok

@yiminghe yiminghe deleted the beforeStart branch September 29, 2015 02:11
@@ -73,6 +74,22 @@ const AjaxUploader = React.createClass({
}
},

upload(file) {
const props = this.props;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beforeUpload无法阻挡onStart的执行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants