def METHOD_NAME(self, event: File, total_content_length: int) -> IO[bytes]:
    content_type = event.headers.get("content-type")
    try:
        content_length = int(event.headers["content-length"])
    except (KeyError, ValueError):
        content_length = 0
    container = self.stream_factory(
        total_content_length,
        content_type,
        event.filename,
        content_length,
    )
    return container