소스 검색

自定义预览服务

wanghaiwu 4 일 전
부모
커밋
c21559642e
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      code/base/nckd-jimin-base-helper/src/main/java/nckd/base/helper/DefaultPreviewCusServiceImpl.java

+ 5 - 0
code/base/nckd-jimin-base-helper/src/main/java/nckd/base/helper/DefaultPreviewCusServiceImpl.java

@@ -161,6 +161,9 @@ public class DefaultPreviewCusServiceImpl  implements PreviewService {
         String ext = fileName.substring(fileName.lastIndexOf(46) + 1);
         if (YunHomeService.isNotNeedDeal(ext)) {
             InputStream in = DecodeFileFactory.getDecodeService().getDecodeFileStream(cacheIn);
+
+            in = FileSECUtils.processFileWithSEC(path, in);
+
             return YunHomeService.getNotNeedTransferRs(in, ext);
         } else {
             String decodeFilePath = DecodeFileFactory.getDecodeService().getDecodeFilePath(path);
@@ -207,6 +210,8 @@ public class DefaultPreviewCusServiceImpl  implements PreviewService {
         try {
             in = FileSECUtils.processFileWithSEC(path, in);
 
+            in = FileSECUtils.processFileWithSEC(path, in);
+
             var7 = this.yunHomeService.transferPreviewStream(config, in, fileName, YunHomeService.getIdFromTempCachePreviewUrl(path));
         } finally {
             if (in != null) {