Context
The RAG knowledge base upload endpoint (POST /api/knowledge/documents) accepts files up to 50MB. However, Fiber's default BodyLimit is 4MB, which means larger uploads will be silently rejected at the framework level before reaching our validation.
Required Change
Set BodyLimit in the Fiber app config to match our upload limit:
app := fiber.New(fiber.Config{
BodyLimit: 50 * 1024 * 1024, // 50MB
})
Security Context
Identified during security audit of the RAG feature (MED-1). Without this, legitimate uploads between 4-50MB will fail with a confusing error.
Acceptance Criteria
Context
The RAG knowledge base upload endpoint (
POST /api/knowledge/documents) accepts files up to 50MB. However, Fiber's defaultBodyLimitis 4MB, which means larger uploads will be silently rejected at the framework level before reaching our validation.Required Change
Set
BodyLimitin the Fiber app config to match our upload limit:Security Context
Identified during security audit of the RAG feature (MED-1). Without this, legitimate uploads between 4-50MB will fail with a confusing error.
Acceptance Criteria
BodyLimitset to 50MB