diff --git a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java index b8291ed6..b7b9c47e 100644 --- a/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-server/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java @@ -75,6 +75,10 @@ public class FileServiceImpl implements FileService { throw exception(FILE_CAPTCHA_ERROR); } } + return getDecryptedBytes(fileId); + } + + public byte[] getDecryptedBytes(Long fileId) throws Exception { FileDO fileDO = validateFileExists(fileId); // 获取加密内容 FileClient client = fileConfigService.getFileClient(fileDO.getConfigId()); @@ -90,6 +94,7 @@ public class FileServiceImpl implements FileService { throw exception(FILE_DECRYPT_FAIL); } } + /** * 上传文件的前缀,是否包含日期(yyyyMMdd) * 目的:按照日期,进行分目录