Hi people Im trying to upload a file this way:

[...]
if form.has_key("filename"):
item = form["filename"]
if item.file:
outp = open("uploaded/file.tmp","w")
data = item.file.read()
outp.write(data)
outp.close()
print "Content-type:text/html\n\n"
print form["filename"].filename

It works now I can improve it by creating random file names (to avoid multiple users accessing the same file) and then I can get the original file name by using os.path stuff but... is there not any way to upload a file different than this? Cant I move the file from the tmp or something? any other way? thanks in advance