1.applyform_add.html
修改身份证件上传允许格式文字提示内容,去掉xls,doc格式
<input type="file" name="zhengj" id="zhengj" /><a style="color:#f00; font-size:12px;">文件格式 png,bmp,jpg</a>

修改前

修改后
2.applyform_add.js
修改身份证件上传允许格式校验,去掉xls,xlsx,doc,docx格式
var str=",jpg,bmp,png,";

修改前

修改后
3.
// LMY 20210512 图片加水印处理
String filePath = sbRealPath.toString();
//System.out.println(fieldName);
if ("zhengj".equalsIgnoreCase(fieldName) && filePath != null && filePath.contains("/") && filePath.contains(".")){
//System.out.println("filePath:\t" + filePath);
String toFilePath = filePath.substring(0, filePath.lastIndexOf("/"));
//System.out.println("toFilePath:\t" + toFilePath);
String toFileName = filePath.substring(filePath.lastIndexOf("/")+1,filePath.lastIndexOf("."));
//System.out.println("toFileName:\t" + toFileName);
String fileType = filePath.substring(filePath.lastIndexOf(".")+1);
//System.out.println("fileType:\t" + fileType);
if ("bmp".equalsIgnoreCase(fileType) || "jpg".equalsIgnoreCase(fileType) || "png".equalsIgnoreCase(fileType)){
//System.out.println("加水印");
markImageByMoreText(filePath, toFilePath, toFileName, fileType, Color.GRAY, "仅供政府信息公开申请使用", -30);
}
}