bug 53947
This commit is contained in:
+1
-9
@@ -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("未读取到文件内容,请检查后重试!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user