HELP, I need write a module, upload a single file

I need write a nginx module to upload a single file by POST method.

Just get post request and move the file to a specified path.

It is simple but I cannot get the POST data now. I want to know how to
move the file from ngx_http_request_t *r to the filesystem.

Thank U !

Posted at Nginx Forum:

On Sun, Oct 11, 2009 at 6:45 AM, gaosboy [email protected] wrote:

I need write a nginx module to upload a single file by POST method.

Just get post request and move the file to a specified path.

It is simple but I cannot get the POST data now. I want to know how to move the file from ngx_http_request_t *r to the filesystem.

It’s easy using the built-in Perl module and
$r->has_request_body(&sub_reference). Look at the docs for Perl
module at http://wiki.nginx.org/NginxEmbeddedPerlModule