Hi, I have a kind of similar problem that Judith has. I need to upload a file too, and I'm using the file widget difined for ad_form. According to what I've read in some openacs forums the file widget returns a list of three elements: the file of the name, the path and the mime type of the file. I can get the filename, but the path and the mime type are always blanked.
This is a snippet of my code. I'd appreciate any help. Thanks in advance.
--
ad_page_contract {
} {
tmp_file:tmpfile,optional
}
ad_form -name fsync -form {
{fuente:file {label "Ruta Archivo Log"}}
{sync:file {label "Ruta Archivo Sync"}}
} -on_submit {
set nfuente [template::util::file::get_property filename $fuente]
set rfuente [template::util::file::get_property tmp_filename $fuente]
ns_log notice ">>>>>>>>>> RUTA FUENTE <<<<<<<<<<"
ns_log notice "nombre: $nfuente"
ns_log notice "ruta: $rfuente"
( --- )
rfuente is blank