I'm not sure you can really do what you want to. The upload module was not designed for this purpose. If you want to do this you either need to modify the source of the upload module or perhaps you can handle such logic by using the lua module to script what to do with the file uploads. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,230184,230206#msg-230206