Is it possible to put PATH like this text/text.txt
into URL parameter in Flask ?
It is important that it contains PATH with slash and dot.
@app.route('/<path>')
def getPath(path):
return path
Is it possible to put PATH like this text/text.txt
into URL parameter in Flask ?
It is important that it contains PATH with slash and dot.
@app.route('/<path>')
def getPath(path):
return path
If you use variable rules with the prefix path
your requirements should be met.
@app.route('/<path:filename>')
def getPath(filename):
return filename