class_docstr: Content size limiting middleware for ASGI applications
  Args:
    app (ASGI application): ASGI application
    max_content_size (optional): the maximum content size allowed in bytes, None for no limit
class_docstr_tok: ["Content","size","limiting","middleware","for","ASGI","applications","Args",":","app","(","ASGI","application",")",":","ASGI","application","max_content_size","(","optional",")",":","the","maximum","content","size","allowed","in","bytes",",","None","for","no","limit"]
code: def __init__(
      self, app: APIRouter, max_content_size: Optional[int] = None
  ):
      self.app = app
      self.max_content_size = max_content_size
  
file_path: fastapi/tests/test_custom_middleware_exception.py
imports: from pathlib import Path
  from typing import Optional
  from fastapi import APIRouter, FastAPI, File, UploadFile
  from fastapi.exceptions import HTTPException
  from fastapi.testclient import TestClient
label_desc: Use image node_id 1 to create a new ContentSizeLimitMiddleware object  with example: obj = ContentSizeLimitMiddleware(app, max_content_size)