forked from Gitlink/forgeplus-react
修改去掉issue、评论等上传文件格式的限制
This commit is contained in:
parent
0192b97ec2
commit
e843b8f492
|
@ -90,13 +90,14 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
beforeUpload = (file) => {
|
||||
if(file && !file.type){
|
||||
let flag = this.checkFile(file.name);
|
||||
if(!flag){
|
||||
this.props.showNotification(`暂不支持此格式文件的上传!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 不对类型进行校验
|
||||
// if(file && !file.type){
|
||||
// let flag = this.checkFile(file.name);
|
||||
// if(!flag){
|
||||
// this.props.showNotification(`暂不支持此格式文件的上传!`);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
const { size } = this.props;
|
||||
const isLt100M = file.size / 1024 / 1024 < size;
|
||||
if (!isLt100M) {
|
||||
|
|
Loading…
Reference in New Issue