def get_object_info(self): """ 查看桶内是否以存在同名对象 :return: """ try: res = self.s3_client.head_object( Bucket=DESTINATION_BUCKET, Key=MULTIPART_UPLOAD_FILE_NAME ) object_size = res["ContentLength"] except botocore.exceptions.ClientError: object_size = -1 return object_size