feat: There is no way the ocr

This commit is contained in:
super_liu
2021-08-31 18:02:50 +08:00
parent 41bef317c7
commit ea473ee500
2 changed files with 12 additions and 2 deletions
@@ -164,7 +164,11 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
saveWordFilePath=ocrFilePath+saveWordFileName;
logger.info(saveWordFilePath);
FileUtils.copyInputStreamToFile(wordFile.getInputStream(),new File(saveWordFilePath));
//生成保存文件
File saveWordFile = new File(saveWordFilePath);
System.out.println(saveWordFile);
wordFile.transferTo(saveWordFile);
// FileUtils.copyInputStreamToFile(wordFile.getInputStream(),new File(saveWordFilePath));
// savePic(wordFile.getInputStream(),saveWordFilePath);
logger.info("word存储完成");
}
@@ -174,7 +178,10 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
saveJsonFilePath=ocrFilePath+saveJsonFileName;
logger.info(saveJsonFilePath);
FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
File saveJsonFile = new File(saveJsonFilePath);
System.out.println(saveJsonFile);
wordFile.transferTo(saveJsonFile);
// FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
// savePic(jsonFile.getInputStream(),saveJsonFilePath);
logger.info("Json存储完成");
}