3

I'm trying to make a button that will show the "Save as" download box. The images that I want to offer for download are not in the static folder, nor they will be. Using flask.send_file works by opening the file in the browser.

How can I use send.file in order to bring the download box up, without submitting the page (without changing the current page)?

1 Answer 1

4

Look into the as_attachment option in send_file:

http://flask.pocoo.org/docs/api/#flask.send_file

Here's a somewhat related question:

Content-Disposition:What are the differences between "inline" and "attachment"?

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.