1. 新增某些场景下需要直接根据 fileId 获取解密文件流的方法

(cherry picked from commit 28db8e3cc3)
This commit is contained in:
chenbowen
2025-09-04 11:13:48 +08:00
committed by chenbowen
parent dd668ba1f1
commit 2c116918c1

View File

@@ -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
* 目的:按照日期,进行分目录