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

Method start_file_streaming

src/quart/formparser.py:170–184  ·  view source on GitHub ↗
(self, event: File, total_content_length: int)

Source from the content-addressed store, hash-verified

168 return "utf-8"
169
170 def start_file_streaming(self, event: File, total_content_length: int) -> IO[bytes]:
171 content_type = event.headers.get("content-type")
172
173 try:
174 content_length = int(event.headers["content-length"])
175 except (KeyError, ValueError):
176 content_length = 0
177
178 container = self.stream_factory(
179 total_content_length,
180 content_type,
181 event.filename,
182 content_length,
183 )
184 return container
185
186 async def parse(
187 self, body: Body, boundary: bytes, content_length: int

Callers 1

parseMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected