Forum OpenACS Development: ns_get_multipart_formdata

Collapse
Posted by demi wilson on
Im trying to upload a file through a html form using ns_get_multipart_formdata. But when i try to do it, i get an error: invalid command name "ns_get_multipart_formdata".

I need help please!!!

This is my code for the adp.

<form enctype=multipart/form-data method=post action="upload">
<input name="file" type="file">
<input type="submit" value="submit">
</form>

and my tcl upload page is:

ad_page_contract {
    Comments and CVS information go here.
} {

} -properties {

}

set file file
set fp [open "/home/testing/file/" w+]
ns_get_multipart_formdata $file $fp
close $fp

ad_return_template