----- Original Message ----- From: "Mihamina Rakotomandimby" <[EMAIL PROTECTED]>
To: <Zope@zope.org>
Sent: Monday, December 18, 2006 7:13 AM
Subject: [Zope] add a File type via a form


Hi,
I have a very simple "index_html".
It s a form in which I ask for an "Id"


<form action="addFile" method="post">
   <div>Id</div>
   <input type="text" name="id" size="40" />
   <input type="submit" name="submit" value="Add File" />
 </form>

what I want is when the visitor fill the form and then submit it, a
"File" object is created inside the same container.

I added a Python script named "addFile" in the same container, and tried
some things... but always failed.

How to create a "File" then?

If you are trying to get your 'visitor' to upload a file (?), then couple of changes to your html:

<form action="addFile" method="post" enctype="multipart/form-data">
<input type="file" name="id" size="40" />

And, in your script file you should be using manage_addFile (google for details if you need them)


If you are not trying to upload a file, then we need some more information as to what you are trying to accomplish.

hth

Jonathan


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to