Skip to content

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

Fix: coroutine object has no attribute get (#11472)

Billy Bao10098198019d
diff --git a/api/apps/file_app.py b/api/apps/file_app.py
index 8b5383a664..e262b3d7bb 100644
--- a/api/apps/file_app.py
+++ b/api/apps/file_app.py
@@ -125,8 +125,8 @@ async def upload():
@validate_request("name")
async def create():
req = await request.json
- pf_id = await request.json.get("parent_id")
- input_file_type = await request.json.get("type")
+ pf_id = req.get("parent_id")
+ input_file_type = req.get("type")
if not pf_id:
root_folder = FileService.get_root_folder(current_user.id)
pf_id = root_folder["id"]