MCPcopy Create free account
hub / github.com/pallets/quart / _parse_multipart

Method _parse_multipart

src/quart/formparser.py:87–107  ·  view source on GitHub ↗
(
        self,
        body: Body,
        mimetype: str,
        content_length: int | None,
        options: dict[str, str],
    )

Source from the content-addressed store, hash-verified

85 return self.cls(), self.cls()
86
87 async def _parse_multipart(
88 self,
89 body: Body,
90 mimetype: str,
91 content_length: int | None,
92 options: dict[str, str],
93 ) -> tuple[MultiDict, MultiDict]:
94 parser = MultiPartParser(
95 cls=self.cls,
96 file_storage_cls=self.file_storage_class,
97 max_content_length=self.max_content_length,
98 max_form_memory_size=self.max_form_memory_size,
99 max_form_parts=self.max_form_parts,
100 stream_factory=self.stream_factory,
101 )
102 boundary = options.get("boundary", "").encode("ascii")
103
104 if not boundary:
105 raise ValueError("Missing boundary")
106
107 return await parser.parse(body, boundary, content_length)
108
109 async def _parse_urlencoded(
110 self,

Callers

nothing calls this directly

Calls 3

parseMethod · 0.95
MultiPartParserClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected