(
self, event: File, total_content_length: int | None
)
| 331 | return "utf-8" |
| 332 | |
| 333 | def start_file_streaming( |
| 334 | self, event: File, total_content_length: int | None |
| 335 | ) -> t.IO[bytes]: |
| 336 | content_type = event.headers.get("content-type") |
| 337 | |
| 338 | try: |
| 339 | content_length = _plain_int(event.headers["content-length"]) |
| 340 | except (KeyError, ValueError): |
| 341 | content_length = 0 |
| 342 | |
| 343 | container = self.stream_factory( |
| 344 | total_content_length=total_content_length, |
| 345 | filename=event.filename, |
| 346 | content_type=content_type, |
| 347 | content_length=content_length, |
| 348 | ) |
| 349 | return container |
| 350 | |
| 351 | def parse( |
| 352 | self, stream: t.IO[bytes], boundary: bytes, content_length: int | None |
no test coverage detected