Commit 8ada8e16 authored by alex yao's avatar alex yao

fix: 文件转换多次异常

parent 5422c7e8
...@@ -414,7 +414,6 @@ public class KnowledgeServiceImpl implements KnowledgeService { ...@@ -414,7 +414,6 @@ public class KnowledgeServiceImpl implements KnowledgeService {
//3、上传文件单一行字数超过3000字,提示:上传文件内容单一行字数不能超过3000字 //3、上传文件单一行字数超过3000字,提示:上传文件内容单一行字数不能超过3000字
//4、单格不可超1000字 //4、单格不可超1000字
//5、文件大小不能超过10M //5、文件大小不能超过10M
try {
// 文件大小不能超过10M // 文件大小不能超过10M
long fileSizeInBytes = file.length(); long fileSizeInBytes = file.length();
double fileSizeInMB = (double) fileSizeInBytes / (1024 * 1024); double fileSizeInMB = (double) fileSizeInBytes / (1024 * 1024);
...@@ -454,10 +453,6 @@ public class KnowledgeServiceImpl implements KnowledgeService { ...@@ -454,10 +453,6 @@ public class KnowledgeServiceImpl implements KnowledgeService {
throw new I18nMessageException("exception/file.content.more.than.3000"); throw new I18nMessageException("exception/file.content.more.than.3000");
} }
} }
} catch (IOException e) {
logger.error("checkQAKnowledgeDocument error :{}", e);
return false;
}
return true; return true;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment