Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix agentbot cannot upload file (#828) (#16946)

Wang Qi77d35a33875f
diff --git a/api/apps/restful_apis/agent_api.py b/api/apps/restful_apis/agent_api.py
index 3c70efe882..df9d77b570 100644
--- a/api/apps/restful_apis/agent_api.py
+++ b/api/apps/restful_apis/agent_api.py
@@ -846,6 +846,7 @@ async def create_agent(tenant_id):
@manager.route("/agents/<agent_id>/upload", methods=["POST"]) # noqa: F821
@login_required
+@login_required(auth_types=[AUTH_JWT, AUTH_API, AUTH_BETA])
@add_tenant_id_to_kwargs
@_require_canvas_access_async
async def upload_agent_file(agent_id, tenant_id):