summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-12-25 21:02:58 -0200
committerdrebs <drebs@leap.se>2014-01-20 16:42:29 -0200
commitf125180609c3e97f56eedfe534f7f1c6f985f8f6 (patch)
treea6db8d63a2917361a57b236f516b216864df939e /server
parent75e9eb251100a2c0e5a93deedbc9fce67f7f1fe6 (diff)
Allow sync of large files (~100MB) (#4836).
Diffstat (limited to 'server')
-rw-r--r--server/changes/feature_4836_allow-sync-of-large-files1
-rw-r--r--server/src/leap/soledad/server/__init__.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/server/changes/feature_4836_allow-sync-of-large-files b/server/changes/feature_4836_allow-sync-of-large-files
new file mode 100644
index 00000000..f124e899
--- /dev/null
+++ b/server/changes/feature_4836_allow-sync-of-large-files
@@ -0,0 +1 @@
+ o Allow sync of large files (~100MB) (#4836).
diff --git a/server/src/leap/soledad/server/__init__.py b/server/src/leap/soledad/server/__init__.py
index b2d55fcd..84f6a849 100644
--- a/server/src/leap/soledad/server/__init__.py
+++ b/server/src/leap/soledad/server/__init__.py
@@ -114,6 +114,10 @@ from leap.soledad.common.couch import CouchServerState
# Soledad WSGI application
#-----------------------------------------------------------------------------
+MAX_REQUEST_SIZE = 200 # in Mb
+MAX_ENTRY_SIZE = 200 # in Mb
+
+
class SoledadApp(http_app.HTTPApp):
"""
Soledad WSGI application
@@ -124,6 +128,9 @@ class SoledadApp(http_app.HTTPApp):
The name of the shared database that holds user's encrypted secrets.
"""
+ max_request_size = MAX_REQUEST_SIZE * 1024 * 1024
+ max_entry_size = MAX_ENTRY_SIZE * 1024 * 1024
+
def __call__(self, environ, start_response):
"""
Handle a WSGI call to the Soledad application.
@@ -143,6 +150,8 @@ class SoledadApp(http_app.HTTPApp):
http_app.url_to_resource.register(LockResource)
+http_app.SyncResource.max_request_size = MAX_REQUEST_SIZE * 1024 * 1024
+http_app.SyncResource.max_entry_size = MAX_ENTRY_SIZE * 1024 * 1024
#-----------------------------------------------------------------------------