[Zope] manage_addFile

Alice Gutman aliceg@rescomp.berkeley.edu
Wed, 26 Jan 2000 15:08:59 -0800 (PST)


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