2021-05-19

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);
                }
              }
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容