Forums

CSV Download

Hi everyone.

My webapp currently saves a csv file to the Files section in python anywhere. If I want the user to be able to save this file locally on their computer instead of having it save to my account, how can I do this?

Something like this if you are using django

I'm using bottle and the csv is saving to the Files region. I need some way to save these to the user's computer instead.

See this for bottle. Also you can consider just setting up static file mappings on the webapps tab if you just have static files you want to send your user (instead of dynamically generated files)

I am using flask.How to download .xls file from browser. The .xls file is getting saved to home directory.Please help.

Do you mean that you see a .xls file from the PythonAnywhere file browser, and you want to download it to your local machine?

I fetched the data from mysql and saved as excel file it to home directory pythonanywhere.I want that excel file to be downloaded by user.How?yes local machine

You could set up a simple website that served it -- though I'd recommend you put it into a subdirectory of your home directory if you want it to be publicly-visible, as when you make a directory visible from a website, it's the whole directory that's accessible, not just one file