Update static_files.md (#1672)

This commit is contained in:
Lagicrus 2019-09-11 22:37:14 +01:00 committed by 7
parent fbcd4b9767
commit b7d4121586

View File

@ -34,6 +34,10 @@ app.url_for('static', name='another', filename='any') == '/another.png'
bp = Blueprint('bp', url_prefix='/bp')
bp.static('/static', './static')
# specify a different content_type for your files
# such as adding 'charset'
app.static('/', '/public/index.html', content_type="text/html; charset=utf-8")
# servers the file directly
bp.static('/the_best.png', '/home/ubuntu/test.png', name='best_png')
app.blueprint(bp)