Description of problem: @40079 If one enters the path to an image in the upload form instead of browsing for it, the system gives no warning if the image does not exist. An 'image' with unknown width and length will be created. The stack trace below is from the MultiPart article image upload. It's a report of the IOException that occurs when the image is empty. Note that this warning doesn't appear for, say, Article image uploading. This means three things: 1) An exception is likely being hidden, or 2) The error is detected by this code, but not reported to the user 3) There's different sets of code doing the same thing 2004-02-04 12:27:48,820 [0][3]] ERROR cms.ImageAsset - IOException guessing file size java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:333) at com.arsdigita.mimetypes.image.JPEGImageSizer.firstMarker(JPEGImageSizer.java:144) at com.arsdigita.mimetypes.image.JPEGImageSizer.scanHeader(JPEGImageSizer.java:285) at com.arsdigita.mimetypes.image.JPEGImageSizer.computeSize(JPEGImageSizer.java:90) at com.arsdigita.mimetypes.image.ImageSizer.computeImageSize(ImageSizer.java:82) at com.arsdigita.cms.ImageAsset.guessSize(ImageAsset.java:215) at com.arsdigita.cms.ImageAsset.loadFromFile(ImageAsset.java:162) at com.arsdigita.cms.contenttypes.ui.mparticle.ImageUploadSection.processImageUpload(ImageUploadSection.java:156) at com.arsdigita.cms.contenttypes.ui.mparticle.SectionEditForm$SectionProcessListener.process(SectionEditForm.java:305)
Fixed @40214. By default, FileUpload widget now adds a validation listener to check for non-empty file upload.