dev_unstable
hjm 6 years ago
parent 068abb8232
commit 37a89ccd8b

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

@ -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;
}

@ -390,8 +390,8 @@ function VideoUploadList (props) {
</div>
{state.videos && state.videos.length === MAX_FILE_COUNT &&
<div className="uploadTip">
<i className="iconfont icon-tishi" style={{color: '#FF6F6F', verticalAlign: 'text-bottom'}}></i>
<span>单次最多支持3个视频文件上传</span>
{/* <i className="iconfont icon-tishi" style={{color: '#FF6F6F', verticalAlign: 'text-bottom'}}></i> */}
<span>提示单次最多支持3个视频文件上传</span>
</div>}
{(!noUploads && state.videos.length < MAX_FILE_COUNT) && <ActionBtn className="publishBtn" onClick={() => document.getElementById('fileUpload').click()}

Loading…
Cancel
Save