修改读取word文件
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user