修改读取word文件

This commit is contained in:
梁琦涛
2024-08-08 09:35:26 +08:00
parent 9e3411a11e
commit d293ba25d3
@@ -27,7 +27,7 @@ public class ReadWordUtil {
// String path = "E:\\DeskTop\\标准所ISO-用户手册.doc";
String str = "--";
try {
if (path.endsWith(".doc")) {
if (path.endsWith(".doc") || path.endsWith(".DOC")) {
// InputStream in = MinioUtil.download(path);
InputStream in = ObsBootUtil.getOssFile(path);
if(!Objects.isNull(in)){
@@ -36,7 +36,7 @@ public class ReadWordUtil {
ex.close();
in.close();
}
} else if (path.endsWith("docx")) {
} else if (path.endsWith(".docx") || path.endsWith(".DOCX")) {
//先把文件存到本地, 用完后在删除
// InputStream in = MinioUtil.download(path);
InputStream in = ObsBootUtil.getOssFile(path);