Welcome! Log In Create A New Profile

Advanced

Re: nginx 1.4.x file upload multipart ecoded

Yichun Zhang (agentzh)
July 26, 2013 02:40PM
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
Subject Author Posted

nginx 1.4.x file upload multipart ecoded

nenad July 25, 2013 08:04PM

Re: nginx 1.4.x file upload multipart ecoded

Yichun Zhang (agentzh) July 26, 2013 01:06AM

Re: nginx 1.4.x file upload multipart ecoded

nenad July 29, 2013 07:17PM

Re: nginx 1.4.x file upload multipart ecoded

Yichun Zhang (agentzh) July 29, 2013 07:30PM

Re: nginx 1.4.x file upload multipart ecoded

djczaski July 26, 2013 07:52AM

Re: nginx 1.4.x file upload multipart ecoded

David J July 26, 2013 08:08AM

Re: nginx 1.4.x file upload multipart ecoded

Yichun Zhang (agentzh) July 26, 2013 02:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready