All pastes #533644 Raw Edit

Miscellany

public python v1 · immutable
·published 2007-06-03 15:09 UTC
rendered paste body
def checkform():    data = cgi.FieldStorage()    if data.has_key("action"):        if data["action"].value == "login":            if data["ftpass"].value == "":                return ftp_init()            return ftp_init(data["ftpass"].value)        elif data["action"].value == "upload":            upfile = data["upfile"].file.read()            outfile = open("outfile.jpg", "w") # HERE i want to have the parsed filename of the uloaded file            outfile.write(data["upfile"].value)