Thanks a million nick. I would apreciate an example....
This is a modified version of code I use...
def bUploadFile(self, sDestinationPath):
'''Save uploaded file to sDestinationPath.
On error return 0. On success return 1.
Form has <input type="file" name"fUpload" ... >
''' if not self.request().hasField('fUpload'):
return 0 fUpload = self.request().field('fUpload')
if not hasattr(fUpload, 'file'):
return 0 try:
fOut = file(sDestinationPath, 'wb')
except IOError:
return 0 while 1:
sLine = fUpload.file.readline()
if not sLine:
break
fOut.write(sLine) fOut.close()
return 1
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
