ソースを参照

自定义预览服务

wanghaiwu 4 日 前
コミット
c21559642e

+ 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) {