diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js index 203242110..7184d2538 100644 --- a/src/forge/Upload/Index.js +++ b/src/forge/Upload/Index.js @@ -61,13 +61,10 @@ class Index extends Component { handleChange = (info) => { const { changeIsComplete } = this.props; changeIsComplete && changeIsComplete(true); - const file = info.file; - if(file && file.type){ - if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - let fileList = info.fileList; - this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); - this.fileIdList(fileList); - } + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let fileList = info.fileList; + this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); + this.fileIdList(fileList); } } @@ -80,10 +77,18 @@ class Index extends Component { } beforeUpload = (file) => { - console.log(file); if(file && !file.type){ - this.props.showNotification(`暂不支持此格式文件的上传!`); - return; + let name = file.name; + const filestr = ['.rar','.iso',".flv", ".rmvb", ".mmf", ".ape"]; + let flag = false; + for(var i= 0;i