From 9743859b4173b680c326518a2075051fc3bda13c Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 24 Feb 2008 00:31:07 +0000 Subject: [PATCH] Now correctly allowing large file uploads. --- config/Common.py | 3 +++ controller/Files.py | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/Common.py b/config/Common.py index c7d76b4..2a2d97b 100644 --- a/config/Common.py +++ b/config/Common.py @@ -67,6 +67,9 @@ settings = { "stream_response": True, "encoding_filter.on": False, }, + "/files/upload": { + "server.max_request_body_size": 505 * MEGABYTE, # maximum upload size + }, "/files/progress": { "stream_response": True }, diff --git a/controller/Files.py b/controller/Files.py index bd63757..866fe5e 100644 --- a/controller/Files.py +++ b/controller/Files.py @@ -148,7 +148,6 @@ class FieldStorage( cherrypy._cpcgifs.FieldStorage ): def make_file( self, binary = None ): global current_uploads, current_uploads_lock - cherrypy.server.max_request_body_size = 0 # remove CherryPy default file size limit of 100 MB cherrypy.response.timeout = 3600 * 2 # increase upload timeout to 2 hours (default is 5 min) cherrypy.server.socket_timeout = 60 # increase socket timeout to one minute (default is 10 sec) DASHES_AND_NEWLINES = 6 # four dashes and two newlines