simple module question

Manlio Perillo manlio_perillo at libero.it
Fri Jul 11 23:46:44 MSD 2008


Valery Kholodkov ha scritto:
> 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.
> 

Thanks!

> 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.
> 

My idea is to:
1) Modify the content-type from multipart/form-data to
    application/x-www-form-urlencoded
2) Any non file parts are urlencoded and written to the new body
3) Files are written to temporary files, and in the new body is written:
    name.filename=filename&name.path=path&name.content-type=content-type
    where name is the field name and path is the temporary path used to
    store the file.

With this method an application needs only to care about urlencoded 
request body.


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


Manlio Perillo





More information about the nginx mailing list