import os import pathlib from flask import Flask, flash, request, redirect, url_for from werkzeug.utils import secure_filename app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def upload(): if request.method == "POST": if 'file' not in request.files: print("no file uploaded") return redirect(request.url) uploaded_files = request.files.getlist("file") print(str(uploaded_files)) for f in uploaded_files: f.save(pathlib.PureWindowsPath("./pics") / secure_filename(f.filename)) return "Successfully uploaded" return ''' Upload new File

Upload new File

''' if __name__ == "__main__": app.run(host="0.0.0.0", port=80, debug=True)