diff options
author | drebs <drebs@leap.se> | 2017-03-16 19:10:47 +0100 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-04-04 18:27:34 +0200 |
commit | aad05fbe35650643e9a3e90f0055f66a4a72e082 (patch) | |
tree | 5c9e3db1ed1d588d9410dcd1c45cb55362c450f6 /server/src | |
parent | da214d8744e8eec1d04d44f7dc42874175553aaa (diff) |
[feat] make blobs server path configurable
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/leap/soledad/server/_blobs.py | 5 |
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) |