bug 53947

This commit is contained in:
liyawei
2022-06-10 15:59:07 +08:00
parent 5087161562
commit 637296e826
@@ -451,15 +451,7 @@ public class FileSpiltService {
throw new JeroBootException("GSO必须选择PDF文件!");
}
InputStream in = CosBootUtil.download(readFilePath);
// 从 cos 拿流写入本地文件
String pdfFilePath = filePath + readFilePath.substring(readFilePath.lastIndexOf("/"));
File file = new File(pdfFilePath);
OutputStream out = new FileOutputStream(file);
IOUtils.copy(in, out);
String readPdf = ReadPdfUtil.readPdf(pdfFilePath);
file.delete();
String readPdf = ReadPdfUtil.readPdf(readFilePath);
if (StringUtils.isEmpty(readPdf)) {
throw new JeroBootException("未读取到文件内容,请检查后重试!");
}