Recent versions of mozilla appear to change how multipart/form-data is handled by the client when an input type=file is used. mozilla-0.9.2.1 and the two versions of netscape that I've tried apparently send all form data such that empty file fields are still seen as file objects to Zope. mozilla-0.9.9 sends data such that empty file fields are empty strings (such as a regular input type=text). This of course breaks Zope products that check file field uploads by using the _.len(request['file']).read() method. They'll need to be wrapped in an if statement now, I guess. Has anyone else seen this? I've talked to some mozilla people and their take is that mozilla was and still is doing the right thing. -- Bryan C. Andregg Duke University Medical Center Programmer Dept. of Anesthesiology e <bryan.andregg@duke.edu> p +1 919 684 6201
Bryan C. Andregg wrote:
This of course breaks Zope products that check file field uploads by using the _.len(request['file']).read() method. They'll need to be wrapped in an if statement now, I guess.
Has anyone else seen this?
I have used this code for checking upload, and this still works fine: image = Image.Image('image', self.title, file) if len(image.data) is 0: image='' self.image = image regards Max M
participants (2)
-
Bryan C. Andregg -
Max M