--- MPIWGWeb/MPIWGStaff.py 2006/01/16 13:46:21 1.10.2.23 +++ MPIWGWeb/MPIWGStaff.py 2006/02/07 20:26:09 1.10.2.24 @@ -131,9 +131,17 @@ class MPIWGStaff(CatalogAware,ZSQLExtend if file and not(file.filename==""): if self.getImageObj(): - self.getImageObj().updateImage(file,rename=None,RESPONSE=None) + self.getImageObj().updateImage(file,rename=None,RESPONSE=None) else: - self.getImageFolder().addImage2(file,fileName=self.getId()) + # create new image object + xp = file.filename.rfind('.') + if xp > 0: + ext = file.filename[xp:] + fn = self.getId()+ext + zLOG.LOG("MPWIG STAFF", zLOG.INFO, "new filename: %s"%fn) + self.getImageFolder().addImage2(file,fileName=fn) + else: + zLOG.LOG("MPWIG STAFF", zLOG.ERROR, "uploaded filename %s has no extension!"%file.filename) self.publishImage=publishImage