bytedance/deer-flow · error · HTTPException

File too large: {display_filename}

Error message

File too large: {display_filename}

What it means

Error "File too large: {display_filename}" thrown in bytedance/deer-flow.

Source

Thrown at backend/app/gateway/routers/uploads.py:270

async def _write_upload_file_with_limits(
    file: UploadFile,
    *,
    uploads_dir: os.PathLike[str] | str,
    display_filename: str,
    max_single_file_size: int,
    max_total_size: int,
    total_size: int,
) -> tuple[os.PathLike[str] | str, int, int]:
    file_size = 0
    upload_temp: _UploadTempFile | None = None
    try:
        upload_temp = await run_file_io(_prepare_upload_destination, uploads_dir, display_filename)
        while chunk := await file.read(UPLOAD_CHUNK_SIZE):
            file_size += len(chunk)
            total_size += len(chunk)
            if file_size > max_single_file_size:
                raise HTTPException(status_code=413, detail=f"File too large: {display_filename}")
            if total_size > max_total_size:
                raise HTTPException(status_code=413, detail="Total upload size too large")
            await run_file_io(_write_upload_chunk, upload_temp, chunk)

        await run_file_io(_commit_upload_temp, upload_temp)
        file_path = upload_temp.file_path
        upload_temp = None
    except Exception:
        if upload_temp is not None:
            await run_file_io(_abort_upload_temp, upload_temp)
        raise
    return file_path, file_size, total_size


def _auto_convert_documents_enabled(app_config: AppConfig) -> bool:
    """Return whether automatic host-side document conversion is enabled.

    The secure default is disabled unless an operator explicitly opts in via

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Reduce the file size below the configured upload limit, or split the file.
  2. Check uploads limits via the limits endpoint; an admin can raise limits in config if appropriate.

When it happens

Trigger: Thrown at backend/app/gateway/routers/uploads.py:270 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14). Data as JSON: /api/errors/15e80d9fe57004e2. Report an issue: GitHub.