The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Problem w/CherryPy 3.0 on Python 2.5 with file upload

Even using the tutorial example, the upload() method gets a string with the name of the uploaded file, but it doesn't have a "file" attribute.

That attribute should be the file handle to actually get the data, as in

def upload(self, myFile):
  theData = myFile.file.read()
  ... more processing ...

but I get an exception that the "file" attribute does not exist.

Is this a known problem? I'd hate to downgrade either python or cherrypy over this.
A. Nony Mouse
Saturday, November 03, 2007
 
 
The upload how to (www.cherrypy.org/wiki/FileUpload) indicates the string passed is the contents of the file.

What are you trying to do?
Honu
Thursday, November 08, 2007
 
 
Thanks for getting back, there were some problems with the invoking form that I was using and the file object didn't really have a file associated with it.

WOrking no, after a bit more headscratching.
A. Nony Mouse
Friday, November 09, 2007
 
 
"Working now" is what I meant.

One of these days I start checking the post before I submit
A. Nony Mouse
Friday, November 09, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz