Task to do a nonmultipart upload
| 785 | |
| 786 | |
| 787 | class PutObjectTask(Task): |
| 788 | """Task to do a nonmultipart upload""" |
| 789 | |
| 790 | def _main(self, client, fileobj, bucket, key, extra_args): |
| 791 | """ |
| 792 | :param client: The client to use when calling PutObject |
| 793 | :param fileobj: The file to upload. |
| 794 | :param bucket: The name of the bucket to upload to |
| 795 | :param key: The name of the key to upload to |
| 796 | :param extra_args: A dictionary of any extra arguments that may be |
| 797 | used in the upload. |
| 798 | """ |
| 799 | with fileobj as body: |
| 800 | client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args) |
| 801 | |
| 802 | |
| 803 | class UploadPartTask(Task): |
no outgoing calls
no test coverage detected