From: Raul E. (wizardteam) <ra...@wi...> - 2006-03-26 20:28:53
|
The error you are getting in "proc FileUpload" comes by a missing "global page" or "variable page" line in it, or at least try setting it as $::page(query). Also, you dont have to do '[return $username]', you can just type '$username', but in your form, you are requesting an uri named '$username', instead a template or cgi, which will produce a "file not found" error unless you have a templeate for each user named as each username in your system. You may have to do a template which will process the upload. See the /forms/file.html and forms/testupload.tml templates in your htdocs files that comes with tclhttpd instalation so you can have an idea. Regards... -=Raul=- -----Original Message----- Sent: Sunday, March 26, 2006 7:29 AM Subject: [Tclhttpd-users] Upload please help Hi all I used upload utilility , i have a problem such that when i submit the upload form i want to return to the same page with the same address "parameter" This is happen because i have many users and each user has his own folder i tried to keep track t the user by posting also the username in a hidden field but it didn ot work let us say that http://localhost:8015/upload.tml?username=abc <form ENCtype=multipart/form-data action=/[return $username] method='post'> File <input type=file> <p> <input type='hidden' name='username' value='[return $username]'> <input type=submit> </form> so it excutes Upload_Url /abc [file join [Doc_Root] /abc] FileUpload FileUpload is defined by proc FileUpload {args} { foreach {name value} $page(query) { set $name $value } Redirect_Self /upload.html?username=$username } it gives me this message can't read "page(query)": no such variable how can i solve this issue ---------------------------------------------------------------------------- -- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. -- Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.1/292 - Release Date: 3/24/2006 |