|
|
@ -20,6 +20,7 @@ import com.bw.ocr.entity.Constants; |
|
|
|
import com.bw.ocr.service.OcrTaskService; |
|
|
|
import com.bw.ocr.utils.DataUtil; |
|
|
|
import com.bw.ocr.utils.DownLoadUtil; |
|
|
|
import com.bw.ocr.utils.FileUtil; |
|
|
|
import com.bw.ocr.utils.SpringBootKafka; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -63,6 +64,9 @@ public class OcrTaskServiceImpl implements OcrTaskService { |
|
|
|
DownLoadUtil.downloadFile(fileUrl, downloadFilePath); |
|
|
|
//加载文件以base64编码 |
|
|
|
String fileContent = encodeFileToBase64(downloadFilePath); |
|
|
|
//删除文件 |
|
|
|
FileUtil.delFile(downloadFilePath); |
|
|
|
|
|
|
|
String token = getToken(input); |
|
|
|
String createUrl = (String) input.get(Constants.CREATEURL); |
|
|
|
String url = createUrl + token; |
|
|
|