File Upload Problem
jadethacker at hotmail.com
Fri Nov 5 00:26:23 CET 2004
I have a page with the file upload as the following:
<form action="UploadConfirm.psp" method="post"
<input type="file" name="UploadFile"><br><br>
after submit, I'd like to retrieve the file name, and I have written
something like this:
TheFile = form['UploadFile']
filename = TheFile.filename
TheFile = 'No file was uploaded, im empty'
filename = ''
when I tested it, I got an error after submitting a file, and the
error message was:
AttributeError: 'StringField' object has no attribute 'filename'
Can anyone tell me what cause the problem and how I can fix it?
Thanks a lot.
More information about the Python-list