| 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 |