made it possible to use /upload/ instead of /upload/upload/
This commit is contained in:
parent
c7f90fb933
commit
8d01dfbd33
|
@ -389,13 +389,17 @@ def upload():
|
|||
return "\n".join(urls)
|
||||
|
||||
|
||||
@app.route("/", methods=["GET"])
|
||||
@app.route("/", methods=["GET", "POST"])
|
||||
@login_required("login")
|
||||
def index():
|
||||
"""
|
||||
Saves the uploaded file and returns a URL pointing to it.
|
||||
"""
|
||||
if request.method == "GET":
|
||||
return render_template("index.html")
|
||||
else:
|
||||
# so I can point my cli script to /upload/ instead of /upload/upload/
|
||||
return upload()
|
||||
|
||||
|
||||
def get_rand_chars(n):
|
||||
|
|
Loading…
Reference in New Issue
Block a user