{
});
}
+ beforeUpload = (file, fileList) => {
+ if (this.props.beforeUpload && !this.props.beforeUpload(file, fileList)) {
+ this.onChange({
+ file,
+ fileList,
+ });
+ return false;
+ }
+ return true;
+ }
+
clearProgressTimer() {
clearInterval(this.progressTimer);
}
@@ -232,6 +243,7 @@ export default class Upload extends React.Component {
onProgress: this.onProgress,
onSuccess: this.onSuccess,
...this.props,
+ beforeUpload: this.beforeUpload,
};
delete rcUploadProps.className;
diff --git a/docs/spec/copywriting.md b/docs/spec/copywriting.md
index 39083d7608..0d92723c2d 100644
--- a/docs/spec/copywriting.md
+++ b/docs/spec/copywriting.md
@@ -125,7 +125,7 @@ title:
登录 |
- 登录 |
+ 登陆 |
登记记录用户输入的注册账号和密码。 |