- 이미지를 백엔드(/account/ocr/receipt)로 업로드 → Vision 텍스트 → 금액·날짜·상호 파싱 - 업로드 전 이미지 축소(최대 1600px JPEG), Tesseract.js 의존성 제거 - 진행률 표시 제거(인식 중…), 정확도·속도 대폭 개선 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -152,4 +152,14 @@ export const accountApi = {
|
||||
removeTag(id) {
|
||||
return http.delete(`/account/tags/${id}`)
|
||||
},
|
||||
|
||||
// 영수증 OCR (백엔드가 Google Vision 호출 → 전체 텍스트 반환)
|
||||
ocrReceipt(blob) {
|
||||
const fd = new FormData()
|
||||
fd.append('image', blob, 'receipt.jpg')
|
||||
return http.post('/account/ocr/receipt', fd, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
timeout: 30000,
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user