...
|
...
|
@@ -245,10 +245,6 @@ public class UploadServiceImpl implements IUploadService { |
|
|
* @throws PlatformException
|
|
|
*/
|
|
|
private void checkFilePixels(File uploadFile, Integer limitType, FileInfo fileInfo) throws PlatformException {
|
|
|
if (null == limitType) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
logger.info("method checkFilePixels exceute.");
|
|
|
|
|
|
BufferedImage sourceImg = null;
|
...
|
...
|
@@ -266,12 +262,16 @@ public class UploadServiceImpl implements IUploadService { |
|
|
fileInfo.setHeight(sourceImg.getHeight());
|
|
|
fileInfo.setWidth(sourceImg.getWidth());
|
|
|
}
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
logger.warn("ImageIO read find wrong", e);
|
|
|
|
|
|
throw new PlatformException("上传文件失败", e, 400);
|
|
|
}
|
|
|
|
|
|
if (null == limitType) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (null != sourceImg && limitType != 1) {
|
|
|
List<Integer> list = picLengthLimitMap.get(limitType);
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
...
|
...
|
|