@@ -42,7 +42,7 @@ def validate_image_field_given(
4242 parser = MultiPartParser ()
4343 _ , files = parser .parse (
4444 stream = io .BytesIO (initial_bytes = request_body ),
45- boundary = boundary .encode ("utf-8" ),
45+ boundary = boundary .encode (encoding = "utf-8" ),
4646 content_length = len (request_body ),
4747 )
4848 if files .get ("image" ) is not None :
@@ -74,7 +74,7 @@ def validate_image_file_size(
7474 parser = MultiPartParser ()
7575 _ , files = parser .parse (
7676 stream = io .BytesIO (initial_bytes = request_body ),
77- boundary = boundary .encode ("utf-8" ),
77+ boundary = boundary .encode (encoding = "utf-8" ),
7878 content_length = len (request_body ),
7979 )
8080 image_part = files ["image" ]
@@ -116,7 +116,7 @@ def validate_image_dimensions(
116116 parser = MultiPartParser ()
117117 _ , files = parser .parse (
118118 stream = io .BytesIO (initial_bytes = request_body ),
119- boundary = boundary .encode ("utf-8" ),
119+ boundary = boundary .encode (encoding = "utf-8" ),
120120 content_length = len (request_body ),
121121 )
122122 image_part = files ["image" ]
@@ -154,7 +154,7 @@ def validate_image_format(
154154 parser = MultiPartParser ()
155155 _ , files = parser .parse (
156156 stream = io .BytesIO (initial_bytes = request_body ),
157- boundary = boundary .encode ("utf-8" ),
157+ boundary = boundary .encode (encoding = "utf-8" ),
158158 content_length = len (request_body ),
159159 )
160160 image_part = files ["image" ]
@@ -188,7 +188,7 @@ def validate_image_is_image(
188188 parser = MultiPartParser ()
189189 _ , files = parser .parse (
190190 stream = io .BytesIO (initial_bytes = request_body ),
191- boundary = boundary .encode ("utf-8" ),
191+ boundary = boundary .encode (encoding = "utf-8" ),
192192 content_length = len (request_body ),
193193 )
194194 image_part = files ["image" ]
0 commit comments