Re: upload with C langage
Brandon Long <[email protected]> Thu, 23 Jul 2009 04:18:47 -0700
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Organization | Fiction L Networks |
| Message-ID | <20090723111847.GA4204@bl1> |
By default, the clearsilver upload code automatically unlinks the file as soon as its created. On Unix, this has the effect that the file "exists" as long as its open, and will be deleted as soon as the process ends. This is useful for CGI programs such that if the program crashes for some reason, the uploaded files won't sit around in the tmp directory. You can change this behavior by setting the HDF variable Config.Upload.Unlink to 0 prior to calling cgi_parse(). With the files not unlinked, you can get the filename from the Query.*.FileName HDF variable. With unlinking enabled, you have to use cgi_filehandle() to get the FILE* pointer, with which you can read the file's contents, copy to a new file somewhere, etc. Brandon On 07/23/09 [email protected] uttered the following other thing: > Hi > > I want to know where is save an uploaded file? > i can upload a file, i can read in the uploaded file but when i go in /var/tmp i cant find my file. > > I try to change my directory with Config.Upload.TmpDir but it doesn't work > > thanks for your answers > > regards > > > arko > > > > ------------------------------------ > > Yahoo! Groups Links > > > -- "I knew it was a great Halloween costume, but I never expected to be attacked by a mob of angry villagers." -- Bizarro 11/10/2003