def upload_object(self, file_path, container, object_name, extra=None,
                      verify_hash=True, headers=None):
        # Note: We don't use any of the base driver functions since Backblaze
        # API requires you to provide SHA1 has upfront and the base methods
        # don't support that

        with open(file_path, 'rb') as fp:
            iterator = iter(fp)
            iterator = read_in_chunks(iterator=iterator)
            data = exhaust_iterator(iterator=iterator)

        obj = self._perform_upload(data=data, container=container,
                                   object_name=object_name,
                                   extra=extra,
                                   verify_hash=verify_hash,
                                   headers=headers)

        return obj
Upload an object.
dataset/ETHPy150Open apache/libcloud/libcloud/storage/drivers/backblaze_b2.py/BackblazeB2StorageDriver.upload_object