|
@@ -236,6 +236,8 @@ public class DefaultPreviewCusServiceImpl implements PreviewService {
|
|
|
checkInputStream = this.fileService.getInputStream(path);
|
|
|
}
|
|
|
|
|
|
+ checkInputStream = FileSECUtils.processFileWithSEC(path, checkInputStream);
|
|
|
+
|
|
|
boolean checkResult = checkFileSize(checkInputStream, fileName, limit == 0L ? limitMax : limit);
|
|
|
if (!checkResult) {
|
|
|
((Map)previewResult).put(PreviewParams.STATUS.getEnumName(), PreviewParams.ERROR.getEnumName());
|
|
@@ -252,7 +254,7 @@ public class DefaultPreviewCusServiceImpl implements PreviewService {
|
|
|
|
|
|
try {
|
|
|
in = this.yunPanConvert(path, fileName, userAgent, detail, temp);
|
|
|
-
|
|
|
+ in = FileSECUtils.processFileWithSEC(path, in);
|
|
|
} catch (Exception var19) {
|
|
|
result = ExceptionUtil.setErrorInfo(var19.getMessage());
|
|
|
((Map)previewResult).put(PreviewParams.STATUS.getEnumName(), PreviewParams.ERROR.getEnumName());
|
|
@@ -383,6 +385,8 @@ public class DefaultPreviewCusServiceImpl implements PreviewService {
|
|
|
throw new KDException(BosErrorCode.previewFailed, new Object[]{BosRes.get("bos-fileservice-sdk", "DefaultPreviewServiceImpl_2", "云盘服务响应失败:", new Object[0]) + var18.getMessage()});
|
|
|
}
|
|
|
|
|
|
+ in = FileSECUtils.processFileWithSEC(path, in);
|
|
|
+
|
|
|
if (in == null) {
|
|
|
throw new KDException(BosErrorCode.previewFailed, new Object[]{BosRes.get("bos-fileservice-sdk", "DefaultPreviewServiceImpl_3", "从云盘中未获取到pdf流数据,pdf转换失败:", new Object[0])});
|
|
|
} else {
|