Now correctly allowing large file uploads.
This commit is contained in:
parent
bb8442bb03
commit
9743859b41
|
@ -67,6 +67,9 @@ settings = {
|
||||||
"stream_response": True,
|
"stream_response": True,
|
||||||
"encoding_filter.on": False,
|
"encoding_filter.on": False,
|
||||||
},
|
},
|
||||||
|
"/files/upload": {
|
||||||
|
"server.max_request_body_size": 505 * MEGABYTE, # maximum upload size
|
||||||
|
},
|
||||||
"/files/progress": {
|
"/files/progress": {
|
||||||
"stream_response": True
|
"stream_response": True
|
||||||
},
|
},
|
||||||
|
|
|
@ -148,7 +148,6 @@ class FieldStorage( cherrypy._cpcgifs.FieldStorage ):
|
||||||
def make_file( self, binary = None ):
|
def make_file( self, binary = None ):
|
||||||
global current_uploads, current_uploads_lock
|
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.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)
|
cherrypy.server.socket_timeout = 60 # increase socket timeout to one minute (default is 10 sec)
|
||||||
DASHES_AND_NEWLINES = 6 # four dashes and two newlines
|
DASHES_AND_NEWLINES = 6 # four dashes and two newlines
|
||||||
|
|
Reference in New Issue