|
|
@@ -203,8 +203,11 @@ const system = { |
|
|
|
projectId, projectName, |
|
|
|
folderId, folderName, folderLevelId, distFileRelativePath = '', |
|
|
|
fileName, fileExtension, sourceFilePath, |
|
|
|
fileList, onSuccess: onSuccessHandler, onProgress: onProgressHandler = identity, onError: onErrorHandler = identity |
|
|
|
fileList, onSuccess: onSuccessHandler, onProgress: onProgressHandler = identity, onError: onErrorHandler = identity, |
|
|
|
totalReadyUploadNum |
|
|
|
} = params; |
|
|
|
let {tempNumWrap} = params;//已经完成的上传文件上传数量 |
|
|
|
|
|
|
|
const extensionedFileName = fileExtension ? `${fileName}.${fileExtension}`: fileName; |
|
|
|
const distFilePath = `${folderName}${distFileRelativePath ? `/${distFileRelativePath}`: ''}`; |
|
|
|
const maybeFile = fileList.find(iFile => distFileRelativePath === iFile.relativePath && `${iFile.archName}${iFile.extension ? `.${iFile.extension}` : ''}` === extensionedFileName); |
|
|
@@ -313,7 +316,15 @@ const system = { |
|
|
|
return; |
|
|
|
} |
|
|
|
//notify.success(maybeFile ? '上传成功, 已覆盖同名文件' : '上传成功'); |
|
|
|
notify.success('文件已上传。') |
|
|
|
tempNumWrap.tempNumCount += 1; |
|
|
|
// console.log('tempNumCount', tempNumWrap.tempNumCount); |
|
|
|
// console.log('totalReadyUploadNum', totalReadyUploadNum); |
|
|
|
if(tempNumWrap.tempNumCount == totalReadyUploadNum) { |
|
|
|
notify.success('文件已上传。') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resolveSuccess(uploadFile); |
|
|
|
} catch (e) { |
|
|
|
console.error('socket-upload-file parse data have error:', e); |
|
|
|