[web2py] Re: Strange behavior for Storage object

2010-04-11 Thread mdipierro
yes On Apr 11, 9:46 am, Mathieu Clabaut wrote: > On Sun, Apr 11, 2010 at 16:31, mdipierro wrote: > > I think the problem is is that request.vars.file is a cgi.FieldStorage > > object and it lacks a __zero__ method therefore it incorrectly > > evaluates to false even if the object is present. Thi

Re: [web2py] Re: Strange behavior for Storage object

2010-04-11 Thread Mathieu Clabaut
On Sun, Apr 11, 2010 at 16:31, mdipierro wrote: > I think the problem is is that request.vars.file is a cgi.FieldStorage > object and it lacks a __zero__ method therefore it incorrectly > evaluates to false even if the object is present. This is an error in > the book. Ah yes... I've looked in

[web2py] Re: Strange behavior for Storage object

2010-04-11 Thread mdipierro
I think the problem is is that request.vars.file is a cgi.FieldStorage object and it lacks a __zero__ method therefore it incorrectly evaluates to false even if the object is present. This is an error in the book. Anyway, the actualy filename is now atumatically base16 encoded in the web2py-assigne