📜  如何将图像发送到不在静态烧瓶中的模板 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.469000             🧑  作者: Mango

代码示例1
from config import directory_to_image_folder

#first create the route
@app.route('/uploads/')
def download_file(filename):
    return send_from_directory(directory_to_image_folder, filename, as_attachment=True)

#add this to the template inside of an image tag