Issue
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
Solution
If you use variable rules with the prefix path
your requirements should be met.
@app.route('/<path:filename>')
def getPath(filename):
return filename
Answered By - Detlef
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.