langflow-ai/langflow · error · HTTPException

File size is larger than the maximum file size {max_file_siz

Error message

File size is larger than the maximum file size {max_file_size_upload}MB.

What it means

Error "File size is larger than the maximum file size {max_file_size_upload}MB." thrown in langflow-ai/langflow.

Source

Thrown at src/backend/base/langflow/api/v1/endpoints.py:1310

    """
    # Writing a file to a flow's storage is a flow mutation: enforce WRITE so
    # the external access ceiling (e.g. a "viewer") cannot upload via this
    # deprecated route. Mirrors the non-deprecated twin in files.py.
    await ensure_flow_permission(
        current_user,
        FlowAction.WRITE,
        flow_id=flow.id,
        flow_user_id=flow.user_id,
        workspace_id=flow.workspace_id,
        folder_id=flow.folder_id,
    )
    try:
        max_file_size_upload = settings_service.settings.max_file_size_upload
    except Exception as exc:
        raise HTTPException(status_code=500, detail=str(exc)) from exc

    if file.size is not None and file.size > max_file_size_upload * 1024 * 1024:
        raise HTTPException(
            status_code=413,
            detail=f"File size is larger than the maximum file size {max_file_size_upload}MB.",
        )

    try:
        flow_id_str = str(flow.id)
        file_path = await asyncio.to_thread(save_uploaded_file, file, folder_name=flow_id_str)

        return UploadFileResponse(
            flow_id=flow_id_str,
            file_path=file_path.as_posix(),
        )
    except Exception as exc:
        await logger.aexception("Error saving file")
        raise HTTPException(status_code=500, detail=str(exc)) from exc


# get endpoint to return version of langflow

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Upload a smaller file below the configured maximum size.
  2. Increase LANGFLOW_MAX_FILE_SIZE_UPLOAD (or the equivalent setting) if larger uploads are required.

When it happens

Trigger: Occurs when an uploaded file exceeds the configured max_file_size_upload limit (in MB) during file upload to the endpoints router.

Common situations: See trigger scenarios.


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/eddba53f3d8def37. Report an issue: GitHub.