#!/usr/bin/python print("Content-type: text/html\n") import os import cgi import cgitb origin_url = "https://augustiner-kantorei.de/upload" cgitb.enable() form = cgi.FieldStorage() fileitem = form['myfile'] if fileitem.filename: # strip leading path from file name to avoid # directory traversal attacks fn = os.path.basename(fileitem.filename) open('../downloads/' + fn, 'wb').write(fileitem.file.read()) print(f"""

Erfolgreich hochgeladen

Zurück zur Maske """)