I'm using aioboto3 to upload various files. Some files occasionally have zero byte length.
What I Did
await s3.upload_file(file_name, s3_bucket, object_name,
Callback=callback,
ExtraArgs={
'ACL': s3_acl,
'Metadata': meta_data
}
)
# The above fails when the file is zero length with the following error.
An error occurred (MalformedXML) when calling the CompleteMultipartUpload operation: Unknown
# Relevant Header sample (possibly missing ETag?)
'headers': {'User-Agent': 'Boto3/1.16.52 Python/3.8.5 Linux/5.11.0-7614-generic Botocore/1.19.52'}, 'body': b'<CompleteMultipartUpload xmlns="http://s3.amazonaws.com/doc/2006-03-01/" />'
What I expected
I had to work around this by using s3.put_object() with an empty byte array. It would be great if the zero byte length files worked through upload_file().
Description
I'm using aioboto3 to upload various files. Some files occasionally have zero byte length.
What I Did
What I expected
I had to work around this by using s3.put_object() with an empty byte array. It would be great if the zero byte length files worked through upload_file().