MCPcopy Create free account
hub / github.com/aws/aws-cli / _put_object

Method _put_object

awscli/s3transfer/__init__.py:765–777  ·  view source on GitHub ↗
(self, filename, bucket, key, callback, extra_args)

Source from the content-addressed store, hash-verified

763 self._put_object(filename, bucket, key, callback, extra_args)
764
765 def _put_object(self, filename, bucket, key, callback, extra_args):
766 # We're using open_file_chunk_reader so we can take advantage of the
767 # progress callback functionality.
768 open_chunk_reader = self._osutil.open_file_chunk_reader
769 with open_chunk_reader(
770 filename,
771 0,
772 self._osutil.get_file_size(filename),
773 callback=callback,
774 ) as body:
775 self._client.put_object(
776 Bucket=bucket, Key=key, Body=body, **extra_args
777 )
778
779 def download_file(
780 self, bucket, key, filename, extra_args=None, callback=None

Callers 1

upload_fileMethod · 0.95

Calls 2

get_file_sizeMethod · 0.45
put_objectMethod · 0.45

Tested by

no test coverage detected