witten
/
luminotes
Archived
1
0
Fork 0

Now correctly allowing large file uploads.

This commit is contained in:
Dan Helfman 2008-02-24 00:31:07 +00:00
parent bb8442bb03
commit 9743859b41
2 changed files with 3 additions and 1 deletions

View File

@ -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
},

View File

@ -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