+ self.image_client = ImageClient(image_url, self.token)
+
+ def upload(self, file_obj, size=None, remote_path=None, hp=None, up=None):
+ """Upload a file to pithos"""
+
+ path = basename(file_obj.name) if remote_path is None else remote_path
+
+ try:
+ self.pithos_client.create_container(self.container)
+ except ClientError as e:
+ if e.status != 202: # Ignore container already exists errors
+ raise e