mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Consolidateion of document upload API (#14106)
### What problem does this PR solve? Consolidation WEB API & HTTP API for document upload Before consolidation Web API: POST /v1/document/upload Http API - POST /api/v1/datasets/<dataset_id>/documents After consolidation, Restful API -- POST /api/v1/datasets/<dataset_id>/documents ### Type of change - [x] Refactoring
This commit is contained in:
@@ -1393,14 +1393,14 @@ class RAGFlowClient:
|
||||
headers = {"Content-Type": encoder.content_type}
|
||||
response = self.http_client.request(
|
||||
"POST",
|
||||
"/document/upload",
|
||||
f"/datasets/{dataset_id}/documents?return_raw_files=true",
|
||||
headers=headers,
|
||||
data=encoder,
|
||||
json_body=None,
|
||||
params=None,
|
||||
stream=False,
|
||||
auth_kind="web",
|
||||
use_api_base=False
|
||||
use_api_base=True
|
||||
)
|
||||
res = response.json()
|
||||
if res.get("code") == 0:
|
||||
|
||||
Reference in New Issue
Block a user