[Zope] No id with manage_addFile()

Peter Sabaini sabaini@inode.at
Fri, 26 Apr 2002 16:26:23 +0200 (CEST)


well i guess its empty because you dont set it :-)
maybe you should add an entry field=20

<input name=3D"id" />

or something like that?

cheers,
peter.

On Fri, 26 Apr 2002, Roger Ineichen wrote:

> Knows sombody why the id is '' (empty) and the funktion not work?
>=20
> I send a file with a form:
> -----------------------------
> <form action=3D"addFile" method=3D"post" enctype=3D"multipart/form-data=
">
> <input type=3D"file" name=3D"file">
> <input type=3D"submit" value=3D"upload">
> </form>
>=20
> To the python method:
> ---------------------
> def addFile(self,file):
>   "This method adds a file"
>   # create the file
>   self.manage_addProduct['OFSP'].manage_addFile(id=3D'', title=3D'',
> file=3Dfile)
>=20
>   # redirect to main page
>   return self.REQUEST.RESPONSE.redirect(index_html, url_quote(message))=
)
>=20
>=20
> The error is:
> -------------
> The id "" contains characters illegal in URLs.
>=20
>=20
> Mit freundlichen Gr=FCssen
> Roger Ineichen
> ___________________________
>=20
> Projekt01 GmbH
> www.projekt01.ch
> Langackerstrasse 8
> 6330 Cham
> phone  +41 (0)41 781 01 78
> mobile +41 (0)79 340 52 32
> fax    +41 (0)41 781 00 78
> email  r.ineichen@projekt01.ch
> ___________________________
> END OF MESSAGE=20
>=20
>=20
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>=20