simple module question

Valery Kholodkov valery+nginxen at grid.net.ru
Fri Jul 11 23:15:12 MSD 2008


Hi!

In my patch for processing uploads you can find an API to process 
multipart/form-data bodies:

http://www.grid.net.ru/nginx/nginx-upload-patch.html

What you need are files upload.c and upload.h.

I'm actually working now on the next version of this module which will 
be able to cut out and store uploaded files in temporal directory and 
proxy the remaining part of the body to a backend with brief information 
about files uploaded.

However I'm now faced with a curious problem regarding nginx internals 
and I expect a solution in 1-2 weeks.

Manlio Perillo wrote:
> Chavelle Vincent ha scritto:
>> Hi,
>>
>> I just want to make a simple module which get uploaded image to a
>> directory with a custom name. All things seem to be good but
>> ngx_http_read_client_request_body create local image with the form
>> header (filename="test.jpg" Content-Type :application-octet-stream
>> etc...). Do you know a simple way to remove it ? I want avoid a new
>> reading from disk.
>>
> 
> Nginx *does not* decode the request body.
> 
> I'm planning to write a function that does the decoding, for use in 
> mod_wsgi, but I don't now when I will find the time.
> 
> It will not exacly be what you want, but the function can be reused.
> If you manage to write such function before me, please let me know (it's 
> not an easy task)!

-- 
Regards,
Valery Kholodkov





More information about the nginx mailing list