update 文档拆分时,解密文件
This commit is contained in:
@@ -114,6 +114,11 @@ public class IntekeyUtils {
|
|||||||
if(ENABLE){
|
if(ENABLE){
|
||||||
return decryptFile(DECRYPT_URL, DECRYPT_APP_CODE, DECRYPT_SECRET_KEY, null, file);
|
return decryptFile(DECRYPT_URL, DECRYPT_APP_CODE, DECRYPT_SECRET_KEY, null, file);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
return file.getInputStream();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -184,8 +184,6 @@ public class FileSpiltService {
|
|||||||
MultipartFile mFile1 = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), is1);
|
MultipartFile mFile1 = new MockMultipartFile(fileName, fileName, ContentType.APPLICATION_OCTET_STREAM.toString(), is1);
|
||||||
InputStream inputStream = IntekeyUtils.getInputStreamByDecryptFile(mFile);
|
InputStream inputStream = IntekeyUtils.getInputStreamByDecryptFile(mFile);
|
||||||
InputStream inputStream1 = IntekeyUtils.getInputStreamByDecryptFile(mFile1);
|
InputStream inputStream1 = IntekeyUtils.getInputStreamByDecryptFile(mFile1);
|
||||||
inputStream = inputStream == null ? is : inputStream;
|
|
||||||
inputStream1 = inputStream1 == null ? is1 : inputStream1;
|
|
||||||
ZipSecureFile.setMinInflateRatio(-1.0d);
|
ZipSecureFile.setMinInflateRatio(-1.0d);
|
||||||
XWPFDocument doc = new XWPFDocument(inputStream);
|
XWPFDocument doc = new XWPFDocument(inputStream);
|
||||||
// 获取文档中的图片
|
// 获取文档中的图片
|
||||||
|
|||||||
Reference in New Issue
Block a user