feat: 如果是zip文件则不加密下载
This commit is contained in:
+7
@@ -137,6 +137,13 @@ public class DownloadDecryptFileServiceImpl implements DownloadDecryptFileServic
|
||||
// 下载文件 先解密,判断组织域,加密
|
||||
try (InputStream is = IntekeyUtils.DecryptFile(decryptUrl, decryptAppCode, decryptSecretKey, null, file)) {
|
||||
MultipartFile fileDecrypt = getMultipartFile(response,is, contentType, fileName);
|
||||
// 判断fileDecrypt是不是zip压缩包,如果是压缩包的话则不加密
|
||||
boolean isZipFile = false;
|
||||
String originalFileName = fileDecrypt.getOriginalFilename();
|
||||
if (originalFileName != null && originalFileName.endsWith(".zip")) {
|
||||
isZipFile = true;
|
||||
}
|
||||
if (isZipFile) return;
|
||||
int scope = getScope();
|
||||
// 加密
|
||||
encryptFile(response, fileDecrypt, scope);
|
||||
|
||||
Reference in New Issue
Block a user