diff --git a/aioboto3/s3/inject.py b/aioboto3/s3/inject.py index 1c842da..4f512b6 100644 --- a/aioboto3/s3/inject.py +++ b/aioboto3/s3/inject.py @@ -265,7 +265,7 @@ async def file_reader() -> None: eof = False while not eof: part += 1 - multipart_payload = b'' + multipart_payload = bytearray() loop_counter = 0 while len(multipart_payload) < multipart_chunksize: try: @@ -284,7 +284,7 @@ async def file_reader() -> None: # shortcircuit upload logic eof = True - multipart_payload = b'' + multipart_payload = bytearray() break if data == b'' and loop_counter > 0: # End of file, handles uploading empty files