[Zope] Uploading to LocalFS object

paul_s_johnson@urscorp.com paul_s_johnson@urscorp.com
Thu, 5 Apr 2001 17:30:20 -0500


I need to create the ability to upload files to a LocalFS object and am
stumped even after searching the archives.

This recipe I found....
===========================================================================
upload_image_form
-------------------------------------------------------------------------
<FORM ACTION="upload_image" METHOD="POST" ENCTYPE="multipart/form-data">
<TABLE CELLSPACING="2">
<TR>
  <TH ALIGN="LEFT" VALIGN="TOP">File</TH>
  <TD ALIGN="LEFT" VALIGN="TOP">
  <INPUT TYPE="file" NAME="file" SIZE="25" VALUE="">
  </TD>
</TR>
<TR>
  <TD></TD>
  <TD><BR><INPUT TYPE="SUBMIT" VALUE="Upload"></TD>
</TR>
</TABLE>
</FORM>


upload_image
-------------------------------------------------------------------------
<dtml-call "REQUEST.set('file',file)">
<dtml-with "LocalFS_objekt_id">
<dtml-call "manage_upload(file, id='',action='manage_workspace')">
</dtml-with>
-------------------------------------------------------------------------
=============================================================================

Produces the following error...
============================
Error Type: AttributeError
Error Value: filename
===========================

Where is this error coming from and how do I fix it?
Where do I stipulate the name of the file as it will be stored on the
server's hard drive?

Any help much appreciated.

P. Johnson