Horje
how to make downloadable file in flask Code Example
how to make downloadable file in flask
from flask import Flask
from flask import send_file
app = Flask(__name__)

@app.route('/download')
def downloadFile ():
    #For windows you need to use drive name [ex: F:/Example.pdf]
    path = "/Examples.pdf"
    return send_file(path, as_attachment=True)

if __name__ == '__main__':
    app.run(port=5000,debug=True) 




Python

Related
change default python version mac Code Example change default python version mac Code Example
python link shortener Code Example python link shortener Code Example
python datetime string Code Example python datetime string Code Example
download playlist from youtube python Code Example download playlist from youtube python Code Example
get text from txt file python Code Example get text from txt file python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7