diff --git a/moto/moto_proxy/utils.py b/moto/moto_proxy/utils.py index bbdb055af..bcd7fe299 100644 --- a/moto/moto_proxy/utils.py +++ b/moto/moto_proxy/utils.py @@ -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():