记得上下班打卡 | git大法好,push需谨慎

Commit 9bc20ed5 authored by jiangxiulong's avatar jiangxiulong

图片鉴定psd处理;截取帧数判断类型

parent fca01797
...@@ -166,16 +166,18 @@ public class AlOssController { ...@@ -166,16 +166,18 @@ public class AlOssController {
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, uploadPath, fileNew); PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, uploadPath, fileNew);
ossClient.putObject(putObjectRequest); ossClient.putObject(putObjectRequest);
if (1 == buckType && !shumeiUtil.checkImage(IDGenerator.nextSnowId(), imgUrl.concat(uploadPath))) { if (contentType.contains("image") && !contentType.equals("image/vnd.adobe.photoshop")) {
ossClient.deleteObject(bucketName, uploadPath); if (!shumeiUtil.checkImage(IDGenerator.nextSnowId(), imgUrl.concat(uploadPath))) {
return null; ossClient.deleteObject(bucketName, uploadPath);
return null;
}
} }
if (resize > 0) { // 裁切 if (resize > 0) { // 裁切
this.ossFileResize(resize, uploadPath, bucketName, ossClient); this.ossFileResize(resize, uploadPath, bucketName, ossClient);
} }
if (isCutFrame > 0) { // 截取帧数 if (isCutFrame > 0 && contentType.contains("video")) { // 截取帧数
ossFileVideoImg = this.ossFileCutFrame(uploadPath, pathName, buckType); ossFileVideoImg = this.ossFileCutFrame(uploadPath, pathName, buckType);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment