Closed yohanboniface closed 6 years ago
i fixed this in https://github.com/yohanboniface/falcon-multipart/pull/5.
the patch not work but you could add the bellow line to let it work
from StringIO import StringIO
new_stream = StringIO(req.stream.read())
form = self.parse(stream=new_stream, environ=req.env)
but this method will duplicate the memory usage i think which might cause problem while processing large file uploading, also it break the streamming processing
Should be fixed by #10
It does not work at the moment when serving falcon with
wsgiref.simple_server.make_server
.Roughly, this gives an io.BufferedReader instance as request body (req.stream in falcon), which seems to consume all the stream when calling
readline
on it (which is what cgi does onFieldStorage.parse_multi
).