langflow-ai/langflow · error · HTTPException
No files provided
Error message
No files provided
What it means
Error "No files provided" thrown in langflow-ai/langflow.
Source
Thrown at src/backend/base/langflow/api/v1/knowledge_bases.py:904
files: Annotated[list[UploadFile], File(description="Files to preview chunking for")],
# Upper bounds cap the memory footprint of a preview request.
# ``max_chunks * chunk_size * CHUNK_PREVIEW_MULTIPLIER`` is the
# largest text slice this endpoint will hold in memory — without
# these bounds, an authenticated user can request gigabytes.
chunk_size: Annotated[int, Form(ge=MIN_CHUNK_SIZE, le=MAX_CHUNK_SIZE)] = 1000,
chunk_overlap: Annotated[int, Form(ge=MIN_CHUNK_OVERLAP, le=MAX_CHUNK_OVERLAP)] = 200,
separator: Annotated[str, Form()] = "\n",
max_chunks: Annotated[int, Form(ge=MIN_MAX_CHUNKS, le=MAX_MAX_CHUNKS)] = 5,
) -> dict[str, object]:
"""Preview how files will be chunked without storing anything.
Uses the same RecursiveCharacterTextSplitter as the ingest endpoint
so the preview accurately reflects what will be stored.
"""
await _guard_kb_action(current_user=current_user, action=KnowledgeBaseAction.CREATE, kb_name=None)
try:
if not files:
raise HTTPException(status_code=400, detail="No files provided")
# Build separators list: user separator first, then defaults
separators = None
if separator:
# Unescape common escape sequences
actual_separator = separator.replace("\\n", "\n").replace("\\t", "\t")
separators = [actual_separator, "\n\n", "\n", " ", ""]
text_splitter = RecursiveCharacterTextSplitter(
chunk_size=chunk_size,
chunk_overlap=chunk_overlap,
separators=separators,
)
file_previews: list[dict[str, Any]] = []
for uploaded_file in files:
try:
file_content = await uploaded_file.read()View on GitHub (pinned to 976ec789d2)
Solutions
- Attach at least one file to the upload request.
When it happens
Trigger: Occurs when an ingestion or preview request to a knowledge base arrives without any attached files.
Common situations: See trigger scenarios.
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/578248a35879663a.
Report an issue: GitHub.