[web2py] Re: Download an external file to 'uploads'

2010-06-19 Thread AsmanCom
Hi, that could be useful for the unzip part: http://www.web2py.com/examples/static/epydoc/web2py.gluon.admin-pysrc.html#unzip And that could be used/customized for the downloading part (Its taken from the great clienttools module: http://www.web2pyslices.com/main/slices/take_slice/8): def _

[web2py] Re: Download an external file to 'uploads'

2010-06-18 Thread scausten
Should have tried harder myself - this works, but is there a better way of doing it? filename, headers = urllib.urlretrieve(link, path.join(os.getcwd(), "applications", request.application, "uploads", "foo.zip")) On Jun 18, 1:56 pm, scausten wrote: > I'm trying to download (using urllib.urlr