|
|
|
@@ -176,9 +176,8 @@ public class UploadController extends BaseController { |
|
|
|
FileOutputStream fos = null; |
|
|
|
String imgFormat = ImgUtil.getImgFormat(fileFormat); |
|
|
|
if(StringUtils.isNotBlank(imgFormat)) { |
|
|
|
String localImgFileName = Constant.fileDirectory + File.separator + tempFileName + fileFormat; |
|
|
|
String tempFileName1 = UUID.randomUUID().toString(); |
|
|
|
String localNewImgFileName = Constant.fileDirectory + File.separator + tempFileName1 + fileFormat; |
|
|
|
String localImgFileName = Constant.fileDirectory + File.separator + tempFileName + "-1" + fileFormat; |
|
|
|
String localNewImgFileName = Constant.fileDirectory + File.separator + tempFileName + fileFormat; |
|
|
|
BufferedInputStream fs = null; |
|
|
|
File localFile = new File(localImgFileName); |
|
|
|
fos = new FileOutputStream(localFile); |
|
|
|
@@ -191,9 +190,8 @@ public class UploadController extends BaseController { |
|
|
|
fos.close(); |
|
|
|
fs.close(); |
|
|
|
logger.info("local file: " + localImgFileName); |
|
|
|
|
|
|
|
File newFile = ImgUtil.thinImage(localImgFileName, localNewImgFileName, imgFormat); |
|
|
|
logger.info("local new file: " + localImgFileName); |
|
|
|
logger.info("local new file: " + localNewImgFileName); |
|
|
|
// 删除本地缓存 |
|
|
|
localFile.delete(); |
|
|
|
ObjectMetadata metadata = new ObjectMetadata(); |
|
|
|
|