[Zope] manage_addFile
Robert Leftwich
robertleftwich@email.com
Thu, 27 Jan 2000 10:26:38 +1100
You need to add the enctype to your <form> tag to get the browser to send
the file data :
<form action="howto_add" enctype="multipart/form-data" >
...
Robert
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Alice
> Gutman
> Sent: Thursday, 27 January 2000 10:09
> To: zope@zope.org
> Cc: zope-hackers@hal.rescomp.berkeley.edu
> Subject: [Zope] manage_addFile
>
>
> I'm trying to take a file that is input to a form and create a file
> object. However, the Content Type is always listed as "text/plain", and
> the content is simply the path of the original file, instead of the file
> itself.
>
> Here is my code:
> <dtml-call "manage_addFolder('foo')">
> <dtml-call "foo.manage_addFile('bar', REQUEST['sgmlfile'])">
>
> and here is the form:
> <form action="howto_add"><table>
> <tr><th>Author</th>
> <td><input type=text name=author></td>
> </tr>
> <tr><th>SGML file</th?
> <td><input type-file name=sgmlfile></td>
> </tr>
> <tr><td></td><td><input type=submit value=" Submit "></td></tr>
> </table></form>
>
> Does anybody have any suggestions as to what I might be doing wrong?
> Also, I tried looking through the source code for manage_addFile to see
> how it works, and I couldn't find it. Can anyone tell me where it is?
>
> Thanks in advance,
> Alice
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>