文件上传限制
This commit is contained in:
parent
3825e8a38a
commit
50d7717efb
@ -74,7 +74,7 @@ $(function() {
|
|||||||
"*.jpg; *.jpeg; *.gif; *.png; *.bmp; *.pdf; *.doc; *.docx; *.xls; *.xlsx; *.ppt; *.pptx; *.txt,*.mp3; *.mp4; *.avi; *.mpeg; *.flv; *.swf; *.wmv"]],
|
"*.jpg; *.jpeg; *.gif; *.png; *.bmp; *.pdf; *.doc; *.docx; *.xls; *.xlsx; *.ppt; *.pptx; *.txt,*.mp3; *.mp4; *.avi; *.mpeg; *.flv; *.swf; *.wmv"]],
|
||||||
repositoryName: repositoryName,
|
repositoryName: repositoryName,
|
||||||
numLimit : 0,
|
numLimit : 0,
|
||||||
sizeLimit : 256 * 1024 * 1024,
|
sizeLimit : 500 * 1024 * 1024,
|
||||||
complete:function(data, e){
|
complete:function(data, e){
|
||||||
//事件回调函数
|
//事件回调函数
|
||||||
},
|
},
|
||||||
@ -104,10 +104,10 @@ $(function() {
|
|||||||
upfileAccessoryTmpObj = tmpObj;
|
upfileAccessoryTmpObj = tmpObj;
|
||||||
|
|
||||||
// 开始校验
|
// 开始校验
|
||||||
if (data.files[0].size > 256 * 1024 * 1024) {
|
if (data.files[0].size > 500 * 1024 * 1024) {
|
||||||
upfileAccessoryTmpObj[data.files[0].name] = {
|
upfileAccessoryTmpObj[data.files[0].name] = {
|
||||||
status: 'error',
|
status: 'error',
|
||||||
msg: '文件过大, 不能大于256M',
|
msg: '文件过大, 不能大于500M',
|
||||||
name: data.files[0].name
|
name: data.files[0].name
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user