文件类型验证忽略大小写

去掉制表符处理的js,影响了ysp的下发
This commit is contained in:
duandongmei
2018-08-09 13:21:21 +08:00
parent d4f4197dec
commit 5964eeca80
2 changed files with 3 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ public class MultipartFileIntercepter extends CommonsMultipartResolver{
for (String fileName : multipartFile.keySet()) { for (String fileName : multipartFile.keySet()) {
MultipartFile file= multipartFile.getFirst(fileName); MultipartFile file= multipartFile.getFirst(fileName);
//文件类型错误 //文件类型错误
if(fileTypes.indexOf(","+FileUtils.getSuffix(file.getOriginalFilename(), false)+",") == -1){ if(fileTypes.indexOf(","+FileUtils.getSuffix(file.getOriginalFilename().toLowerCase(), false)+",") == -1){
throw new MultiPartNewException(errorInfo,file.getOriginalFilename(),fileTypes.substring(0,fileTypes.length()-1).substring(1),prop,null); throw new MultiPartNewException(errorInfo,file.getOriginalFilename(),fileTypes.substring(0,fileTypes.length()-1).substring(1),prop,null);
} }
if(file.getSize() > fileMaxSize){ if(file.getSize() > fileMaxSize){

View File

@@ -407,11 +407,11 @@ $(function(){
form.submit(); form.submit();
} }
}); });
$("#ipCfgFrom input, #cfgForm input, #cfgFrom input").change(function(){ /* $("#ipCfgFrom input, #cfgForm input, #cfgFrom input").change(function(){
var s = $(this).val(); var s = $(this).val();
var ns = s.replace(/\t|\r|\n/mg, ""); var ns = s.replace(/\t|\r|\n/mg, "");
$(this).val(ns); $(this).val(ns);
}); });*/
}); });
window.onload=function(){ window.onload=function(){
//日志查询IP类型增加格式提示 //日志查询IP类型增加格式提示