Dear Massimo, I write a view:
<form action='' method='post'>
<input type='file' name='filepath' >
<input type='submit' >
</form>
and a controller
def provafile():
if request.vars.filepath:
print "0>>>>>", request.vars.filepath.getvalue('filename')
return dict()
but error raise: request.vars.filepath is a str object, not
FieldStorage
Where my error?
On 24 Ott, 17:24, mdipierro <[email protected]> wrote:
> request.vars.pippo would be a cgi.FieldStorage object:
>
> http://docs.python.org/library/cgi.html
>
> On Oct 24, 10:20 am, leone <[email protected]> wrote:
>
>
>
> > I can't understand as web2py renders <input text='file'
> > name='pippo'...> in request object.
> > request.var.pippo is filename; where is fileobject?
> > Somewhere your manual has the answer, but I have no success to find
> > it.
> > Thanks
>
> > PS. I learn very much reading plugin approach
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---