diff --git a/local/bin/saveserver.py b/local/bin/saveserver.py new file mode 100755 index 0000000..15ff1ce --- /dev/null +++ b/local/bin/saveserver.py @@ -0,0 +1,25 @@ +#!/bin/python + +from flask import Flask, request +from werkzeug import secure_filename +app = Flask(__name__) + +FORM = """ + +
+ + +
+ +""" + +@app.route("/", methods=["GET", "POST"]) +def form(): + if request.method == "POST": + f = request.files["the_file"] + f.save('./' + secure_filename(f.filename)) + return FORM + + +if __name__ == "__main__": + app.run(host='0.0.0.0')