27 Mar
2004
27 Mar
'04
12:38 p.m.
From: "John Schinnerer" <johnschinnerer@yahoo.com>
My main need now is the below question - how to test if there is a file to be uploaded or not by checking in REQUEST somehow.
If you use the standard html input tag to get the user to select a file eg. <input type="file" name="fname"> Then what you see in REQUEST is 'fname' as a 'fileupload instance' (not a file name). 'fname' has an attribute called 'filename', which you can use as follows: <dtml-call "REQUEST.set('title', fname.filename)"> <dtml-call "manage_addFile(id=REQUEST['id'], file=REQUEST['fname'], title=REQUEST['title'])"> HTH Jonathan