made it possible to use /upload/ instead of /upload/upload/

This commit is contained in:
iou1name 2019-04-02 10:47:24 -04:00
parent c7f90fb933
commit 8d01dfbd33

View File

@ -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.
"""
return render_template("index.html")
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):