summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/_blobs.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/_blobs.py b/client/src/leap/soledad/client/_blobs.py
index f9f1515b..e781421e 100644
--- a/client/src/leap/soledad/client/_blobs.py
+++ b/client/src/leap/soledad/client/_blobs.py
@@ -163,6 +163,9 @@ class BlobManager(object):
data = yield self._client.get(uri)
defer.returnValue((yield data.json()))
+ def local_list(self):
+ return self.local.list()
+
@defer.inlineCallbacks
def put(self, doc, size):
fd = doc.blob_fd
@@ -289,6 +292,13 @@ class SQLiteBlobBackend(object):
if result:
defer.returnValue(BytesIO(str(result[0][0])))
+ @defer.inlineCallbacks
+ def list(self):
+ query = 'select blob_id from blobs'
+ result = yield self.dbpool.runQuery(query)
+ if result:
+ defer.returnValue([b_id[0] for b_id in result])
+
def _init_blob_table(conn):
maybe_create = (