Re: upload file
Nikolai Kondrashov <[email protected]>
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Message-ID | <[email protected]> |
sj29fr wrote: > This solution works nice. I can read my file with fp but I would like > to have the filename path (/var/tmp/cgi_uploadXXXX). > How can I do that ? From here: http://www.clearsilver.net/docs/special_vars.cst ---:<--- By default, the PUT handler, and the RFC2388 multipart/form-data POST file handler unlink the files they create in cgi_parse as soon as they create them, but keep the file handle open to the files. This means that as soon as the files are closed, they will be removed. If the CGI prematurely exits, the files will automatically be removed. If this is set to 0, the files will not be unlinked immediately. This would allow you to access the files directly from your CGI, instead of only accessing them through the existing filehandle returned by cgi_filehandle. The files will be in Config.Upload.TmpDir and be named cgi_upload.XXXXXX as created by mkstemp(). The files will be removed in cgi_destroy(), but if the CGI exits prematurely, the files will not be removed. You will need to have a periodic job cleanup old files to prevent your filesystem from filling up. --->:--- Your file path will be in the Query.<parameter>.path Sincerely, Nick