diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js index f366d5da..cfa22349 100644 --- a/src/forge/Upload/Index.js +++ b/src/forge/Upload/Index.js @@ -57,11 +57,26 @@ class Index extends Component { handleChange = (info) => { const { changeIsComplete } = this.props; changeIsComplete && changeIsComplete(true); + 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 === 'done') { + let filelist = info.fileList && info.fileList.length>0 && info.fileList[info.fileList.length-1]; + if(filelist && filelist.response && filelist.response.status === -1){ + this.props.showNotification(filelist.response.message) + this.setState((state) => { + state.fileList.pop() + return { + fileList: state.fileList, + }; + }); + this.fileIdList(this.state.fileList); + } + } } }