|
|
|
@ -1134,11 +1134,12 @@
|
|
|
|
|
// 选择文件的按钮。可选。
|
|
|
|
|
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
|
|
|
|
pick: {id:'#pickerVideo'},
|
|
|
|
|
fileSingleSizeLimit:11*1024*1024, //设定单个文件大小
|
|
|
|
|
// dnd: true,
|
|
|
|
|
paste: document.body,
|
|
|
|
|
accept: {
|
|
|
|
|
title: '视频',
|
|
|
|
|
extensions: 'mp4,3gp,wmv,asf,asx,mov,m4v,avi,flv',
|
|
|
|
|
extensions: 'mp4,3gp,wmv,asf,asx,mov,m4v,avi,flv,',
|
|
|
|
|
mimeTypes: '.mp4,.3gp,.wmv,.asf,.asx,.mov,.m4v,.avi,.flv',
|
|
|
|
|
},
|
|
|
|
|
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
|
|
|
@ -1184,7 +1185,6 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
uploaderVideo.on( 'uploadSuccess', function( file , response) {
|
|
|
|
|
console.log(file);
|
|
|
|
|
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
|
|
|
|
|
//alert(JSON.stringify(response));
|
|
|
|
|
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelvideo table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
|
|
|
|
@ -1201,6 +1201,17 @@
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 验证文件格式以及文件大小
|
|
|
|
|
*/
|
|
|
|
|
uploaderVideo.on("error",function (type){
|
|
|
|
|
if (type=="Q_TYPE_DENIED"){
|
|
|
|
|
layer.msg("不支持该视频格式");
|
|
|
|
|
}else if(type=="F_EXCEED_SIZE"){
|
|
|
|
|
layer.msg("视频大小不能超过20M");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
uploaderVideo.on( 'uploadError', function( file ) {
|
|
|
|
|
$( '#'+file.id ).find('p.state').text('上传出错');
|
|
|
|
|
});
|
|
|
|
|