Uploads broken on windows 7 x64
def addimage(self, **params): up_file = params['image1'] f = open(up_file.filename,'w') while True: data = up_file.file.read() f.write(data) if not data: break f.close()
on windows 7 x64 (Cherrypy 3.2.2) produces a broken file after uploading. This code executes fine on my debian box.
This is the image I used.
I suspect it has to do with newline chars on windows. Using the same code but uploading a text file produces a file with double the line count