Re: upload file [solved]

"sj29fr" <[email protected]> Tue, 15 Jan 2008 08:17:46 -0000
Newsgroups gmane.text.clearsilver.general
Message-ID <[email protected]>
Hi Brandon,

> Hmm, are you sure that Config.Upload.Unlink is set to 0?  Ie, its also
> in the hdf dump?
>  

In fact the problem comes from this flag. 
I called cgi_parse() before reading my HDF file.


> Normally, no.  If unlink is set, clearsilver does keep track of the
> filenames to unlink them later in cgi->filenames, which is a ULIST, and
> it'll be in the same index in that ulist as FileHandle, so you could
> look it up... but I don't think it'll be there if it isn't in FileName.

So my solution is :
if ((err = hdf_set_value(cgi->hdf, "Config.Upload.Unlink", "0")))
  NEOERR_HANDLER;
if ((err = cgi_parse(cgi))) NEOERR_HANDLER;

Regards,
Sebastien