|
@@ -131,7 +131,7 @@ public class AiApiDemoTest {
|
|
|
|
|
|
private void testOcr() throws Exception {
|
|
|
File file = new File("D:\\home\\test.png");
|
|
|
- MultipartBody.Part part = UploadFile.build("image", "", file);
|
|
|
+ MultipartBody.Part part = UploadFile.build("image", file.getName(), file);
|
|
|
|
|
|
String result = ocrApiClient.forImage(secret, OcrType.HANDWRITING, part);
|
|
|
System.out.println(result);
|