{"record":{"id":"15e80d9fe57004e2","repo":"bytedance/deer-flow","slug":"file-too-large-display-filename","errorCode":null,"errorMessage":"File too large: {display_filename}","messagePattern":"File too large: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":413,"severity":"error","filePath":"backend/app/gateway/routers/uploads.py","lineNumber":270,"sourceCode":"\nasync def _write_upload_file_with_limits(\n    file: UploadFile,\n    *,\n    uploads_dir: os.PathLike[str] | str,\n    display_filename: str,\n    max_single_file_size: int,\n    max_total_size: int,\n    total_size: int,\n) -> tuple[os.PathLike[str] | str, int, int]:\n    file_size = 0\n    upload_temp: _UploadTempFile | None = None\n    try:\n        upload_temp = await run_file_io(_prepare_upload_destination, uploads_dir, display_filename)\n        while chunk := await file.read(UPLOAD_CHUNK_SIZE):\n            file_size += len(chunk)\n            total_size += len(chunk)\n            if file_size > max_single_file_size:\n                raise HTTPException(status_code=413, detail=f\"File too large: {display_filename}\")\n            if total_size > max_total_size:\n                raise HTTPException(status_code=413, detail=\"Total upload size too large\")\n            await run_file_io(_write_upload_chunk, upload_temp, chunk)\n\n        await run_file_io(_commit_upload_temp, upload_temp)\n        file_path = upload_temp.file_path\n        upload_temp = None\n    except Exception:\n        if upload_temp is not None:\n            await run_file_io(_abort_upload_temp, upload_temp)\n        raise\n    return file_path, file_size, total_size\n\n\ndef _auto_convert_documents_enabled(app_config: AppConfig) -> bool:\n    \"\"\"Return whether automatic host-side document conversion is enabled.\n\n    The secure default is disabled unless an operator explicitly opts in via","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/routers/uploads.py#L252-L288","documentation":"Error \"File too large: {display_filename}\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/app/gateway/routers/uploads.py:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the file size below the configured upload limit, or split the file.","Check uploads limits via the limits endpoint; an admin can raise limits in config if appropriate."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}