Re: upload file
Brandon Long <[email protected]> Mon, 14 Jan 2008 23:27:42 -0800
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Organization | Fiction L Networks |
| Message-ID | <20080115072742.GC2532@bl1> |
On 01/14/08 sj29fr uttered the following other thing:
> > > I have this in my C source code :
> > > char *filename = NULL;
> > > if ((err = hdf_get_copy(cgi->hdf, "Query.firmware.FileName",
> > > &filename, "\0"))) NEOERR_HANDLER;
> > > My filename is always "\0".
> > > I don't understand because Query.firmware.FileHandle gives me the good
> > > FILE * on my file.
> > Please try to use hdf_dump_format(cgi->hdf, 0, stderr) in order to
> dump all of your dataset
> > and try to look for the pathname.
>
> > > I use ClearSilver 0.10.5.
> > I use ClearSilver 0.10.4.
> >
> > > Did I miss something ?
> > Everything seems OK for me.
>
> I enabled debug output and I see that when Config.Upload.Unlink = 0
>
> Query.firmware = reg920t.def
> Query.firmware.Type = application/octet-stream
> Query.firmware.FileHandle = 1
>
> I don't have Query.firmware.FileName
Hmm, are you sure that Config.Upload.Unlink is set to 0? Ie, its also
in the hdf dump?
> Is there a possibility to get FileName with FileHandle ?
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.
Brandon
--
"Its much more fun to be sand than oil in the machinery of life."
http://www.fiction.net/blong/