Fix incorrect instantiation of MultipartParser

This commit is contained in:
Sky O 2024-03-28 19:50:36 +00:00
parent d767a2799b
commit 8eaa8788b9

View File

@ -8,8 +8,8 @@ def get_body_from_form_data(
body: bytes, boundary: str
) -> Tuple[Optional[bytes], Dict[str, str]]:
body_stream = io.BytesIO(body)
parser = multipart.MultipartParser(body_stream, boundary=boundary)
parser = multipart.MultipartParser(boundary=boundary)
parser.write(body_stream)
data = None
headers: Dict[str, str] = {}
for prt in parser.parts():