Re: [Zope] External Method not accepting CGI module
11 Jul
2000
11 Jul
'00
10:50 p.m.
Kelvin Cheong writes:
import cgi
form = cgi.FieldStorage() This gives you an empty "FieldStorage"
fileitem = form["userTABPIX1"] In it, "userTABPIX1" is unknown.
fname = tempfile.mktemp() fp=open(fname,'w') fp.write(fileitem.file.read()) fp.close() Give your external method either the first argument "self" or an argument "REQUEST".
In the first case, you can use "REQUEST=self.REQUEST" to get the REQUEST object. In the second case, you use REQUEST directly. "REQUEST.form" contains the form variables of the REQUEST. Dieter
9401
Age (days ago)
9401
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dieter Maurer