[Zope] Showing the name of a file-type form variable

Dieter Maurer dieter@handshake.de
Tue, 29 Aug 2000 22:43:26 +0200 (CEST)


Jean Jordaan writes:
 >   <td><input type="file" 
 >              name="file"
 >              <dtml-if file> value="<dtml-var "file">" </dtml-if>
 >              ></td> 
 > 
 > Which returns::
 > 
 >   <ZPublisher.HTTPRequest.FileUpload instance at 131dc48>
This is a perfect receipt where you should look for information:

	[<Zope>/lib/python/]ZPublisher/HTTPRequest.FileUpload

You will find there:

    File upload objects

    File upload objects are used to represent file-uploaded data.

    File upload objects can be used just like files.

    In addition, they have a 'headers' attribute that is a dictionary
    containing the file-upload headers, and a 'filename' attribute
    containing the name of the uploaded file.

Consequently, you will use

	<dtml-var "file.filename">


Dieter