On Fri, Sep 3, 2010 at 5:49 AM, ykhuang <ykhu...@gmail.com> wrote: > Hi, > > I wrote a WSAPI script to handle POST upload and it works fine with files > under size of 4M. > When I increase the upload size to 8M, the WSAPI ran out of memory when > executing > * > * > *local request = wsapi.request.new(wsapi_env)* > > I thought it exited when executing parse_post_data(), is it a limitation of > WSAPI or Lua? > Any suggestion to handle large upload file? > > Take a look at this:
https://luci.subsignal.org/trac/browser/luci/trunk/libs/http/luasrc/http/protocol.lua <https://luci.subsignal.org/trac/browser/luci/trunk/libs/http/luasrc/http/protocol.lua>It handles file uploads without the need to have the whole file in memory. It might give you a starting point. Regards, Ignacio
_______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/