|
@@ -252,15 +252,17 @@ public class FileSECUtils {
|
|
|
fos.write(buffer, 0, bytesRead);
|
|
|
}
|
|
|
}
|
|
|
+ //返回临时文件输入流,不能使用的文件流
|
|
|
+ InputStream tmpInputStream = new FileInputStream(tempFile);
|
|
|
|
|
|
// 2. 调用是否加密接口方法
|
|
|
int isEncrypted = checkFileIsEncryptionRest(new FileInputStream(tempFile));
|
|
|
if (isEncrypted == -1) {
|
|
|
logger.info("--------------SEC附件检查,文件加密状态检查失败----------------");
|
|
|
- return inputStream;
|
|
|
+ return tmpInputStream;
|
|
|
} else if (isEncrypted == 0) {
|
|
|
logger.info("--------------SEC附件检查,是明文无需解密----------------");
|
|
|
- return inputStream;
|
|
|
+ return tmpInputStream;
|
|
|
}
|
|
|
|
|
|
// 3. 获取文件大小
|