summaryrefslogtreecommitdiff
path: root/server/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-03-16 19:10:47 +0100
committerdrebs <drebs@leap.se>2017-04-04 18:27:34 +0200
commitaad05fbe35650643e9a3e90f0055f66a4a72e082 (patch)
tree5c9e3db1ed1d588d9410dcd1c45cb55362c450f6 /server/src/leap
parentda214d8744e8eec1d04d44f7dc42874175553aaa (diff)
[feat] make blobs server path configurable
Diffstat (limited to 'server/src/leap')
-rw-r--r--server/src/leap/soledad/server/_blobs.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index 6f3585d2..956df642 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -45,7 +45,6 @@ logger = Logger()
# TODO some error handling needed
-# [ ] make path configurable
# [ ] sanitize path
# for the future:
@@ -101,9 +100,11 @@ class IBlobsBackend(Interface):
@implementer(IBlobsBackend)
class FilesystemBlobsBackend(object):
- path = '/tmp/blobs/'
quota = 200 * 1024 # in KB
+ def __init__(self, blobs_path):
+ self.path = blobs_path
+
def tag_header(self, user, blob_id, request):
with open(self._get_path(user, blob_id)) as doc_file:
doc_file.seek(-16, 2)