mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-29 04:08:12 +08:00
Fix: add /v1/document/upload_info -> /api/v1/documents/upload back (#16264)
This commit is contained in:
@@ -34,6 +34,7 @@ Deprecated APIs and their replacements:
|
||||
- PUT /api/v1/chats/{chat_id}/sessions/{session_id} -> PATCH /api/v1/chats/{chat_id}/sessions/{session_id}
|
||||
- DELETE /api/v1/chats -> DELETE /api/v1/chats/{chat_id} (with body)
|
||||
- POST /api/v1/file/convert -> POST /api/v1/files/link-to-datasets
|
||||
- POST /v1/document/upload_info -> POST /api/v1/documents/upload
|
||||
- GET /api/v1/file/* -> GET /api/v1/files*
|
||||
- POST /api/v1/file/* -> POST /api/v1/files*
|
||||
- GET /api/v1/document/get/{doc_id} -> GET /api/v1/documents/{doc_id}/preview
|
||||
@@ -563,6 +564,25 @@ async def deprecated_file_upload_info():
|
||||
return await document_api.upload_info(tenant_id=tenant_id)
|
||||
|
||||
|
||||
@legacy_v1_manager.route("/document/upload_info", methods=["POST"])
|
||||
@login_required
|
||||
async def deprecated_legacy_document_upload_info():
|
||||
"""
|
||||
Deprecated: Use POST /api/v1/documents/upload instead.
|
||||
|
||||
Old path: POST /v1/document/upload_info
|
||||
New path: POST /api/v1/documents/upload
|
||||
"""
|
||||
from api.apps import current_user
|
||||
|
||||
logging.warning(
|
||||
"API endpoint /v1/document/upload_info is deprecated. "
|
||||
"Please use POST /api/v1/documents/upload instead."
|
||||
)
|
||||
tenant_id = current_user.id
|
||||
return await document_api.upload_info(tenant_id=tenant_id)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Document APIs
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user