修改去掉issue、评论等上传文件格式的限制

This commit is contained in:
何童崇 2023-01-13 09:52:09 +08:00
parent 0192b97ec2
commit e843b8f492
1 changed files with 8 additions and 7 deletions

View File

@ -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) {