NGINX Upload Module - Temp Filenames to Proper Fil
nginx-forum at nginx.us
Wed Jun 15 19:47:28 MSD 2011
Am using NGINX Upload module to store files in my server's disk. The
filenames are in 10 digit numbers. When I tried to figure out things,
the filename is allocated with 10 byte extra memory and a generated
value of 10 digit becomes file name.
Here are my questions / clarifications:
The files uploaded to my server are uploaded using a unique ID of 16
digits (no duplicates). Though I can parse the HTTP header for the 16
digit, I donno how to use that to store the file in that name.
1. I tried using freeing "file->name.data" and reallocate the variable
to store the 16 digit filename. It failed.
2. I tried using a variable of type "ngx_str_t" to send the filename to
the function "ngx_open_tempfile(ngx_str_t_filename, 1,
ulcf->store_access);". The CPU usage raised significantly and 20 out of
30 files got uploaded.
Can anyone advice / help me in solving this problem?
- Reuben Joseph
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,207205,207205#msg-207205
More information about the nginx