Bug 115002 - Image upload gives no warning for non-existent files
Image upload gives no warning for non-existent files
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise CMS
Classification: Retired
Component: content types (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Scott Seago
Jon Orris
:
Depends On:
Blocks: 113496
  Show dependency treegraph
 
Reported: 2004-02-05 08:38 EST by Jon Orris
Modified: 2007-04-18 13:02 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-10 17:35:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Orris 2004-02-05 08:38:16 EST
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 16:55:57 EST
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.