-
-
Notifications
You must be signed in to change notification settings - Fork 23.2k
Description
🐞 Problem Description
When using the Document Store API in Flowise (v3.x), the endpoint for creating a loader does not work as documented.
I tried calling the following endpoints:
- POST /api/v1/internal/document-store/loader/save
- POST /api/v1/document-store/loader/save
- POST /api/v1/document-store/loader
All of them return the Flowise frontend HTML page (index.html) instead of JSON.
This indicates that the route is not registered on the server.
Because of this, I cannot get a loaderId.
When I call:
POST /api/v1/document-store/upsert/:storeId
I always get this error:
{"statusCode":500,"success":false,"message":"Error: documentStoreServices.upsertDocStoreMiddleware - Loader not configured"}
yaml
Copy code
Even though I pass:
- loaderName
- chunkSize
- chunkOverlap
- useSplit
- loaderId (but loaderId cannot be created because loader API does not exist)
✅ Expected Behavior
A working loader creation endpoint such as:
- POST /api/v1/document-store/loader
or - POST /api/v1/internal/document-store/loader/save
should return JSON like:
{
"id": "",
"loaderName": "pdf",
"loaderConfig": { ... }
}
yaml
Copy code
Instead, Flowise returns the UI HTML file.
🔄 Steps to Reproduce
- Start Flowise v3.x on Windows
- Send a POST request to:
POST http://localhost:3000/api/v1/document-store/loader
yaml
Copy code
- Flowise returns index.html
- Calling
/upsertfails with “Loader not configured”
🧪 Full Python Code Used
import requests
API = "http://localhost:3000/api/v1"
TOKEN = ""
headers = {
"Authorization": f"Bearer {TOKEN}",
"Content-Type": "application/json"
}
payload = {
"storeId": "76cccd65-f2b8-4fe6-abd8-408a391a9b18",
"loaderName": "pdf",
"loaderConfig": {
"useSplit": True,
"chunkSize": 500,
"chunkOverlap": 50
}
}
res = requests.post(
f"{API}/document-store/loader",
json=payload,
headers=headers
)
print("Status:", res.status_code)
print("Response:", res.text)
shell
Copy code
Output
Status: 200
Response: ... (Flowise UI HTML)
yaml
Copy code
❌ Issue 1: File Upload API Fails (403 Forbidden)
Calling:
POST /api/v1/files
makefile
Copy code
Returns:
UPLOAD RESPONSE: 403 {"message":"Forbidden"}
shell
Copy code
Python Code
import requests
TOKEN = "MY_TOKEN"
BASE = "http://localhost:3000/api/v1"
headers = {
"Authorization": f"Bearer {TOKEN}"
}
file_path = r"D:\jh\doc\lech202.pdf"
with open(file_path, "rb") as f:
upload_res = requests.post(
f"{BASE}/files",
headers=headers,
files={"files": ("lech202.pdf", f, "application/pdf")},
data={"folderName": "root"}
)
print("UPLOAD RESPONSE:", upload_res.status_code, upload_res.text)
yaml
Copy code
Token works for:
- GET /api/v1/document-store/store
- GET /api/v1/auth/resolve
But /files returns Forbidden (403).
❌ Issue 2: Loader Creation API Missing / Not Working
Tried:
- POST /api/v1/internal/document-store/loader/save
- POST /api/v1/document-store/loader/save
- POST /api/v1/document-store/loader
All return Flowise frontend HTML, not JSON:
Status: 200
Response: ... (index.html)
Thus, loaderId cannot be created.
❌ Issue 3: Upsert Always Fails With “Loader not configured”
Calling:
POST /api/v1/document-store/upsert/:storeId
Returns:
{
"statusCode": 500,
"success": false,
"message": "Error: documentStoreServices.upsertDocStoreMiddleware - Loader not configured"
}
Since loaderId cannot be created, upsert always fails.
🧪 cURL Commands to Reproduce
1️⃣ Loader Creation API (returns HTML)
curl -X POST "http://localhost:3000/api/v1/document-store/loader" ^
-H "Authorization: Bearer " ^
-H "Content-Type: application/json" ^
--data "{
"storeId": "76cccd65-f2b8-4fe6-abd8-408a391a9b18",
"loaderName": "pdf",
"loaderConfig": {
"useSplit": true,
"chunkSize": 500,
"chunkOverlap": 50
}
}"
2️⃣ File Upload API (403 Forbidden)
curl -X POST "http://localhost:3000/api/v1/files" ^
-H "Authorization: Bearer " ^
-F "files=@d:\jh\doc\lech202.pdf" ^
-F "folderName=root"
3️⃣ Upsert API (Loader not configured)
curl -X POST "http://localhost:3000/api/v1/document-store/upsert/76cccd65-f2b8-4fe6-abd8-408a391a9b18" ^
-H "Authorization: Bearer " ^
-F "files=@d:\jh\doc\lech202.pdf" ^
-F "loaderId="
Since loaderId cannot be created, this always fails.
🖥️ System Info
- OS: Windows 10
- Flowise Version: 3.0.8
- Node: 18+
- Running via:
npm start(packages/server/bin/start)
🟧 Summary (Important)
There are 3 major issues in Flowise v3.x:
/api/v1/filesreturns 403 Forbidden- Loader creation API route is missing or incorrectly mapped
- Upsert fails because loaderId cannot be created
BUG: Loader API route is missing or incorrect, causing Document Store upload and upsert to fail in Flowise v3.x.