Thanks Justin!

But how do you copy the file to its destination?
I tried many ways, such as this, with no result:

def POST(self):
        x = web.input(myfile={})
        web.debug(x['myfile'].value) # This is the file contents
        web.debug(x['myfile'].filename) # This is the filename

        out = open(x['myfile'].filename,'wb')
        import shutil
        shutil.copyfileobj(x, out)

        web.redirect('/upload')

Any hint?
luis

On Feb 20, 1:00 am, Justin Davis <[EMAIL PROTECTED]> wrote:
> Per your request:
>
> http://webpy.org/cookbook/fileupload
>
> Cheers,
> Justin
>
> On Feb 18, 11:57 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Very good idea!
> > By the way, if anyone could contribute a simple "file upload" recipe,
> > it would be very much appreciated...
>
> > On 18 feb, 12:59, "Anand Chitipothu" <[EMAIL PROTECTED]> wrote:
>
> > > I have started a cookbook to build documentation for web.py 0.3.
>
> > > Add your recipes/requests tohttp://webpy.org/cookbook
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to