etwist/server.py
branchstable
changeset 5279 42a37a50f2ff
parent 5273 c4caef6f09c9
child 5302 dfd147de06b2
child 5325 f1c660e1169e
equal deleted inserted replaced
5278:f912e40324c4 5279:42a37a50f2ff
   281         return http.Response(code, req.headers_out, content)
   281         return http.Response(code, req.headers_out, content)
   282 
   282 
   283 from twisted.internet import defer
   283 from twisted.internet import defer
   284 from twisted.web2 import fileupload
   284 from twisted.web2 import fileupload
   285 
   285 
   286 # XXX set max file size to 200Mo: put max upload size in the configuration
   286 # XXX set max file size to 200MB: put max upload size in the configuration
   287 # line below for twisted >= 8.0, default param value for earlier version
   287 # line below for twisted >= 8.0, default param value for earlier version
   288 resource.PostableResource.maxSize = 200*1024*1024
   288 resource.PostableResource.maxSize = 200*1024*1024
   289 def parsePOSTData(request, maxMem=100*1024, maxFields=1024,
   289 def parsePOSTData(request, maxMem=100*1024, maxFields=1024,
   290                   maxSize=200*1024*1024):
   290                   maxSize=200*1024*1024):
   291     if request.stream.length == 0:
   291     if request.stream.length == 0: