I managed to get it working. I looked up the download method in the 
Response class and apparently it's looking for a table name and field in 
the file name. I added that structure [table.field.] to my zipped file name 
[table.field.zipfile_name.zip] and passed it to the download as an argument 
in URL() and now it works. it zips the file, saves it, then downloads it, 
Now the next thing I want to do is delete the saved zip file from inside my 
app once it has been downloaded.

On Saturday, 11 April 2015 19:43:47 UTC+1, sasogeek wrote:
>
> I zipped the files and saved it in a folder...but how do I download it 
> now? using the the download function doesn't work...
>
> On Saturday, 11 April 2015 13:21:03 UTC+1, Louis Amon wrote:
>>
>> I think you'd have to loop through a selection and use retrieve() (
>> http://pydal.readthedocs.org/en/latest/index.html?highlight=retrieve#pydal.objects.Field.retrieve
>> )
>>
>> If you need a one-click download then perhaps you could zip all the files 
>> using the zip <https://docs.python.org/2/library/zipfile.html> library 
>> (or gzip or whatever compression you want to use ^^)
>>
>> On Saturday, April 11, 2015 at 1:47:19 PM UTC+2, sasogeek wrote:
>>>
>>> Is there a way I could download all the files in a db or loop through a 
>>> db selection and download all associated files via maybe just a click on a 
>>> link?
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to