summaryrefslogtreecommitdiff
path: root/src/leap/soledad/client/_db
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-07-07 02:58:09 -0300
committerdrebs <drebs@leap.se>2017-07-18 15:30:30 -0300
commit1aa9dee0ce87434188d37c821617caeff24fd70f (patch)
treead95887aa4b7c598390d994aaa109bf8aa6e2fb9 /src/leap/soledad/client/_db
parent679e1bb7990fc1fc9c4971db6383a75ae6acab80 (diff)
[feature] add namespace support for BlobsManager
'namespace' argument is supported by backend but not yet exposed on API for clients. Since IncomingBox makes heavy usage of it, this commit exposes the argument as a query string for clients to use it.
Diffstat (limited to 'src/leap/soledad/client/_db')
-rw-r--r--src/leap/soledad/client/_db/blobs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py
index 8f9f4769..604d4bef 100644
--- a/src/leap/soledad/client/_db/blobs.py
+++ b/src/leap/soledad/client/_db/blobs.py
@@ -240,7 +240,7 @@ class BlobManager(object):
logger.error('sorry, dunno what happened')
@defer.inlineCallbacks
- def _encrypt_and_upload(self, blob_id, fd):
+ def _encrypt_and_upload(self, blob_id, fd, **params):
# TODO ------------------------------------------
# this is wrong, is doing 2 stages.
# the crypto producer can be passed to
@@ -254,7 +254,7 @@ class BlobManager(object):
crypter = BlobEncryptor(doc_info, fd, secret=self.secret,
armor=False)
fd = yield crypter.encrypt()
- response = yield self._client.put(uri, data=fd)
+ response = yield self._client.put(uri, data=fd, params=params)
check_http_status(response.code)
logger.info("Finished upload: %s" % (blob_id,))