
March 22nd, 2003, 01:23 PM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
python field storage
Hi all,
I'm having trouble getting the value I want out of cgi.FieldStorage(). i know how to get the value, and the key. how do i get the middle value whatever thats called, the reason I'm asking is i have to make a CGI upload script for a page I'm working on and I need to be able to get the filename of the file being uploaded from a file input box.
the way im working it, the file is read and a new file - with the same file name as the file being uploaded - is created simply by writing the files data to the new file.
FieldStorage('field', 'C:\\text\\text.txt', 'sample text')
I think i need to get the directory bit but I cant index it. is there a simple way of doing this?
Thanks,
Mark.
|