We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I download a file? I want to show all files in .html When use press one file, web server should be able to send that file so user can download.
i can only stream the log files and other files. But i need option to download files too.
Any help? thanks
The text was updated successfully, but these errors were encountered:
This works for me:
@server.route('/db', methods=['GET']) def download_db(request): with open('database.txt', 'r') as f: content = f.read() return server.Response(body=content, status=200, headers={"Content-Disposition": "attachment;filename=db.csv", "Content-Type": "text/csv", "Content-Length": len(content)})
Sorry, something went wrong.
No branches or pull requests
How do I download a file?
I want to show all files in .html
When use press one file, web server should be able to send that file so user can download.
i can only stream the log files and other files. But i need option to download files too.
Any help?
thanks
The text was updated successfully, but these errors were encountered: