Bug 115002 - Image upload gives no warning for non-existent files
Summary: Image upload gives no warning for non-existent files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: content types
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Scott Seago
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: 113496
TreeView+ depends on / blocked
 
Reported: 2004-02-05 13:38 UTC by Jon Orris
Modified: 2007-04-18 17:02 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-10 22:35:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Jon Orris 2004-02-05 13:38:16 UTC
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)

Comment 1 Scott Seago 2004-02-09 21:55:57 UTC
Fixed @40214. By default, FileUpload widget now adds a validation
listener to check for non-empty file upload.


Note You need to log in before you can comment on or make changes to this bug.