Reputation:
I try this <a href='./number.xls'>download</a>
,but it didn't work. I know that links get different in web.py, but I just want to know how to click the link and download a file just like we used to do in a static environment.
Upvotes: 1
Views: 543
Reputation: 17516
When you say 'just like we used to do in a static enviroment', do you mean you're generating the number.xls
file dynamically? Try setting the Content Disposition header if you are
Uses of content-disposition in an HTTP response header
Upvotes: 0
Reputation: 9599
Store those files in the static
directory along with your web.py application. Then use <a href='static/number.xls'>download</a>
.
Upvotes: 2
Reputation: 11
This should work find like you have it.
download is the proper syntax for this operation. Maybe try setting the target from self/blank to new window.
Upvotes: 0