I'm trying to do something akin to the 'quick' way in the cookbook
( though not for a large file )

     photofile = request.POST['userphoto']

the problem is that i learned that I can not do this:

     if not photofile:

to make sure that someone submitted a photo.

that raises an error:

File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
cgi.py', line 633 in __len__
  return len(self.keys())
File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
cgi.py', line 609 in keys
  raise TypeError, "not indexable"
TypeError: not indexable

which casues all sorts of problems as I try to pipe this photofile
object down the line into other classes

can anyone offer some suggestions ?

i was thinking of doing something like type checking after "if 'file'
not in request.POST", but thats getting kind of silly (i think)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to