|
@@ -297,19 +297,21 @@ public class FileSECUtils {
|
|
|
InputStream tmpInputStream = new FileInputStream(tempFile);
|
|
|
|
|
|
// 2. 调用是否加密接口方法
|
|
|
+ filepath = System.getProperty("java.io.tmpdir") + "/" + tempFile.getName();
|
|
|
+
|
|
|
int isEncrypted = checkFileIsEncryptionRest(new FileInputStream(tempFile));
|
|
|
if (isEncrypted == -1) {
|
|
|
logger.info("--------------SEC附件检查,文件加密状态检查失败----------------");
|
|
|
|
|
|
String tempPath = FileUtils.checkFileUrl(filepath);
|
|
|
- FileTimeoutUtil.removeFile(tempPath, null, 10 * 1000); // 定时 120 秒后删除文件
|
|
|
+ FileTimeoutUtil.removeFile(tempPath, tmpInputStream, 120 * 1000); // 定时 120 秒后删除文件
|
|
|
|
|
|
return tmpInputStream;
|
|
|
} else if (isEncrypted == 0) {
|
|
|
logger.info("--------------SEC附件检查,是明文无需解密----------------");
|
|
|
|
|
|
String tempPath = FileUtils.checkFileUrl(filepath);
|
|
|
- FileTimeoutUtil.removeFile(tempPath, null, 10 * 1000); // 定时 120 秒后删除文件
|
|
|
+ FileTimeoutUtil.removeFile(tempPath, tmpInputStream, 120 * 1000); // 定时 120 秒后删除文件
|
|
|
|
|
|
return tmpInputStream;
|
|
|
}
|