Some of the information here may be outdated, please check the book instead
[edit]

Something like this should do it:

def get_my_file():
    filename=request.args[0]
    path=os.path.join(request.folder,'uploads',filename)
    response.headers['ContentType'] ="application/octet-stream";
    response.headers['Content-Disposition']="attachment; filename=" +filename
    return response.stream(open(path),chunk_size=4096)
© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.