Hello!
On Fri, Jul 26, 2013 at 5:06 AM, David J wrote:
> I was looking at resty upload module. I was curious how to store the file on
> disk relative to the document root?
>
> For some reason it didn't work unless I specified the absolute path.
>
You can just obtain the document root in Lua via
ngx.var.document_root, i.e., accessing Nginx's built-in variable
$document_root:
http://wiki.nginx.org/HttpCoreModule#.24document_root
So it's trivial to construct a proper absolute path without assuming
what the document root is in Lua.
Regards,
-agentzh
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx