feat: add /pipeline/ingest_file endpoint for .txt/.pdf upload

This commit is contained in:
hyungi
2025-08-13 08:48:17 +09:00
parent 6e7cf8eafa
commit 6346635ac1
2 changed files with 61 additions and 1 deletions

View File

@@ -233,6 +233,18 @@ curl -s -X POST http://localhost:26000/pipeline/ingest \
- 번역 켜짐(`translate=true`): 번역본이 `outputs/html/<doc_id>.html`로 생성되고, 번역문이 인덱스에 추가됩니다.
- 번역 꺼짐(`translate=false`): 원문으로 HTML만 생성되고, 원문 텍스트가 인덱스에 추가됩니다.
파일 업로드 버전(`/pipeline/ingest_file`): `.txt`/`.pdf` 지원
```bash
curl -s -X POST http://localhost:26000/pipeline/ingest_file \
-H 'X-API-Key: <키>' \
-F 'file=@/path/to/file.pdf' \
-F 'doc_id=doc-001' \
-F 'generate_html=true' \
-F 'translate=false' \
-F 'target_language=ko'
```
Paperless에서 다수 문서를 일괄 인덱싱합니다.