X-Git-Url: https://git.rvb.name/lua-filemanager.git/blobdiff_plain/2ab2f7398805613c07c9d31c2968537928b87a39..refs/heads/master:/usr/lib/lua/cgi.lua diff --git a/usr/lib/lua/cgi.lua b/usr/lib/lua/cgi.lua index f5108ee..e9068e5 100644 --- a/usr/lib/lua/cgi.lua +++ b/usr/lib/lua/cgi.lua @@ -1,5 +1,9 @@ -- cgi util module +local uci = require("uci") +local u_c = uci.cursor() +local tmppath = u_c.get("filemanager","config","tmpdir") + local prevbuf = "" local blocksize = 4096 local _M = {} @@ -31,7 +35,7 @@ function _M.new(req) req.boundary = "--" .. req.boundary end -- this is useful only if you have /tmp on tmpfs like in openwrt. otherwise can be set to "" - req.tempdir = "/tmp" + req.tempdir = tmppath req.post = {} end @@ -113,4 +117,4 @@ function _M.parse_request_body (req) return 400, "Malformed POST. Boundary not properly ended with CRLF or --." end -return _M \ No newline at end of file +return _M