{"record":{"id":"578248a35879663a","repo":"langflow-ai/langflow","slug":"no-files-provided","errorCode":null,"errorMessage":"No files provided","messagePattern":"No files provided","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"src/backend/base/langflow/api/v1/knowledge_bases.py","lineNumber":904,"sourceCode":"    files: Annotated[list[UploadFile], File(description=\"Files to preview chunking for\")],\n    # Upper bounds cap the memory footprint of a preview request.\n    # ``max_chunks * chunk_size * CHUNK_PREVIEW_MULTIPLIER`` is the\n    # largest text slice this endpoint will hold in memory — without\n    # these bounds, an authenticated user can request gigabytes.\n    chunk_size: Annotated[int, Form(ge=MIN_CHUNK_SIZE, le=MAX_CHUNK_SIZE)] = 1000,\n    chunk_overlap: Annotated[int, Form(ge=MIN_CHUNK_OVERLAP, le=MAX_CHUNK_OVERLAP)] = 200,\n    separator: Annotated[str, Form()] = \"\\n\",\n    max_chunks: Annotated[int, Form(ge=MIN_MAX_CHUNKS, le=MAX_MAX_CHUNKS)] = 5,\n) -> dict[str, object]:\n    \"\"\"Preview how files will be chunked without storing anything.\n\n    Uses the same RecursiveCharacterTextSplitter as the ingest endpoint\n    so the preview accurately reflects what will be stored.\n    \"\"\"\n    await _guard_kb_action(current_user=current_user, action=KnowledgeBaseAction.CREATE, kb_name=None)\n    try:\n        if not files:\n            raise HTTPException(status_code=400, detail=\"No files provided\")\n\n        # Build separators list: user separator first, then defaults\n        separators = None\n        if separator:\n            # Unescape common escape sequences\n            actual_separator = separator.replace(\"\\\\n\", \"\\n\").replace(\"\\\\t\", \"\\t\")\n            separators = [actual_separator, \"\\n\\n\", \"\\n\", \" \", \"\"]\n\n        text_splitter = RecursiveCharacterTextSplitter(\n            chunk_size=chunk_size,\n            chunk_overlap=chunk_overlap,\n            separators=separators,\n        )\n\n        file_previews: list[dict[str, Any]] = []\n        for uploaded_file in files:\n            try:\n                file_content = await uploaded_file.read()","sourceCodeStart":886,"sourceCodeEnd":922,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/knowledge_bases.py#L886-L922","documentation":"Error \"No files provided\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when an ingestion or preview request to a knowledge base arrives without any attached files.","commonSituations":"See trigger scenarios.","solutions":["Attach at least one file to the upload request."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}