summaryrefslogtreecommitdiff
path: root/server/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-02-21 14:16:26 -0300
committerdrebs <drebs@leap.se>2017-02-27 14:28:24 -0300
commit7eb1ffa1d49a7e0016c5980da71151e715abc77a (patch)
tree7ace24e9c93a20294278549434173b4e1915c2bf /server/src/leap
parenta96801e7f3f4e6aeeb08355f7bac4f47b2454dac (diff)
[feat] add configurable blobs path in server
- Resolves: #8777
Diffstat (limited to 'server/src/leap')
-rw-r--r--server/src/leap/soledad/server/_blobs.py10
-rw-r--r--server/src/leap/soledad/server/_config.py1
2 files changed, 11 insertions, 0 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index 0424aae0..ae09f409 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -19,14 +19,24 @@ Blobs Server implementation.
"""
from twisted.web import resource
+from ._config import get_config
+
__all__ = ['blobs_resource']
+_config = get_config()
+DEFAULT_BLOBS_PATH = _config['blobs_path']
+
+
class BlobsResource(resource.Resource):
isLeaf = True
+ def __init__(self, blobs_path=DEFAULT_BLOBS_PATH):
+ resource.Resource.__init__(self)
+ self._blobs_path = blobs_path
+
def render_GET(self, request):
return 'blobs is not implemented yet!'
diff --git a/server/src/leap/soledad/server/_config.py b/server/src/leap/soledad/server/_config.py
index 1818c38d..e89e70d6 100644
--- a/server/src/leap/soledad/server/_config.py
+++ b/server/src/leap/soledad/server/_config.py
@@ -29,6 +29,7 @@ CONFIG_DEFAULTS = {
'admin_netrc': '/etc/couchdb/couchdb-admin.netrc',
'batching': True,
'blobs': False,
+ 'blobs_path': '/srv/leap/soledad/blobs',
},
'database-security': {
'members': ['soledad'],