{"record":{"id":"eddba53f3d8def37","repo":"langflow-ai/langflow","slug":"file-size-is-larger-than-the-maximum-file-size-ma","errorCode":null,"errorMessage":"File size is larger than the maximum file size {max_file_size_upload}MB.","messagePattern":"File size is larger than the maximum file size (.+?)MB\\.","errorType":"http","errorClass":"HTTPException","httpStatus":413,"severity":"error","filePath":"src/backend/base/langflow/api/v1/endpoints.py","lineNumber":1310,"sourceCode":"    \"\"\"\n    # Writing a file to a flow's storage is a flow mutation: enforce WRITE so\n    # the external access ceiling (e.g. a \"viewer\") cannot upload via this\n    # deprecated route. Mirrors the non-deprecated twin in files.py.\n    await ensure_flow_permission(\n        current_user,\n        FlowAction.WRITE,\n        flow_id=flow.id,\n        flow_user_id=flow.user_id,\n        workspace_id=flow.workspace_id,\n        folder_id=flow.folder_id,\n    )\n    try:\n        max_file_size_upload = settings_service.settings.max_file_size_upload\n    except Exception as exc:\n        raise HTTPException(status_code=500, detail=str(exc)) from exc\n\n    if file.size is not None and file.size > max_file_size_upload * 1024 * 1024:\n        raise HTTPException(\n            status_code=413,\n            detail=f\"File size is larger than the maximum file size {max_file_size_upload}MB.\",\n        )\n\n    try:\n        flow_id_str = str(flow.id)\n        file_path = await asyncio.to_thread(save_uploaded_file, file, folder_name=flow_id_str)\n\n        return UploadFileResponse(\n            flow_id=flow_id_str,\n            file_path=file_path.as_posix(),\n        )\n    except Exception as exc:\n        await logger.aexception(\"Error saving file\")\n        raise HTTPException(status_code=500, detail=str(exc)) from exc\n\n\n# get endpoint to return version of langflow","sourceCodeStart":1292,"sourceCodeEnd":1328,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/endpoints.py#L1292-L1328","documentation":"Error \"File size is larger than the maximum file size {max_file_size_upload}MB.\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when an uploaded file exceeds the configured max_file_size_upload limit (in MB) during file upload to the endpoints router.","commonSituations":"See trigger scenarios.","solutions":["Upload a smaller file below the configured maximum size.","Increase LANGFLOW_MAX_FILE_SIZE_UPLOAD (or the equivalent setting) if larger uploads are required."],"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"}