diff --git a/public/react/src/modules/user/usersInfo/video/AliyunUploaderManager.js b/public/react/src/modules/user/usersInfo/video/AliyunUploaderManager.js index a76f7f07b..ea7b060ad 100644 --- a/public/react/src/modules/user/usersInfo/video/AliyunUploaderManager.js +++ b/public/react/src/modules/user/usersInfo/video/AliyunUploaderManager.js @@ -47,7 +47,7 @@ function doCreateUploader (options) { addFileSuccess: function (uploadInfo) { console.log("addFileSuccess: " + uploadInfo.file.name) - + options.addFileSuccess && options.addFileSuccess(uploadInfo) uploader.startUpload() }, // 开始上传 @@ -77,7 +77,7 @@ function doCreateUploader (options) { var videoId = data.VideoId uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress, videoId) - options.addFileSuccess && options.addFileSuccess(uploadInfo) + }).catch((error) => { // 删除当前出错的,并执行下一个任务 @@ -109,7 +109,7 @@ function doCreateUploader (options) { uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress) // , videoId - options.addFileSuccess && options.addFileSuccess(uploadInfo) + }).catch((error) => { uploader.deleteFile(uploader._curIndex) uploader.nextUpload() diff --git a/public/react/src/modules/user/usersInfo/video/VideoReducer.js b/public/react/src/modules/user/usersInfo/video/VideoReducer.js index 96faada0f..6765e0468 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoReducer.js +++ b/public/react/src/modules/user/usersInfo/video/VideoReducer.js @@ -4,7 +4,7 @@ function find(state, action) { let _index = -1 state.videos.some((item, index) => { // 同文件不同名字 fileHash也是一样的 - if (item.loaded != 100 && (action.uploadInfo.fileHash == item.fileHash && action.uploadInfo.file.name == item.name)) { + if (item.loaded != 100 && ((!item.fileHash || action.uploadInfo.fileHash == item.fileHash) && action.uploadInfo.file.name == item.name)) { _index = index return true; } diff --git a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js index aaca13352..dcf195deb 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js +++ b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js @@ -390,8 +390,8 @@ function VideoUploadList (props) { {state.videos && state.videos.length === MAX_FILE_COUNT &&
- - 单次最多支持3个视频文件上传 + {/* */} + 提示:单次最多支持3个视频文件上传
} {(!noUploads && state.videos.length < MAX_FILE_COUNT) && document.getElementById('fileUpload').click()}