Issue Details (XML | Word | Printable)

Key: GAL-69
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Eli Cochran
Reporter: Eli Cochran
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Contrib: Image Gallery

IE6/7: uploaded images do not display in the gallery

Created: 26-Nov-2007 14:59   Updated: 27-Nov-2007 17:02
Component/s: Image Gallery
Affects Version/s: Nightly/SVN-Trunk
Fix Version/s: Nightly/SVN-Trunk

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. GAL-69-upload-via-ie7.jpg
(37 kB)
Environment: IE6 and IE7 running under Parallels Desktop (but also verified on a PC)
Issue Links:
Relate
 


 Description  « Hide
This issue was formerly FLUID-120 [http://issues.fluidproject.org/browse/FLUID-120] by Justin Obara

After uploading an image using IE7, it displays under the resources section of both IE7 and Firefox. However, neither of them display the new image in the gallery. When the image is uploaded using firefox, into the same folder, the image is now displayed in the gallery and viewable by both IE7 and Firefox.


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Eli Cochran added a comment - 26-Nov-2007 15:01
Totally weird bug. Does the right thing on FF on Windows and Safari on the Mac.

Ray Davis added a comment - 27-Nov-2007 15:03
Note the different icons shown by Resources for a JPG file uploaded by IE 7 and an JPG file uploaded by FF.

Eli Cochran added a comment - 27-Nov-2007 15:07
brilliant Ray! I think what's happening is that IE isn't passing along something that tells the back-end that this is a valid image file!

Ray Davis added a comment - 27-Nov-2007 15:07
The IE 7 uploaded file is given a MIME type of "image/jpg"; the FF one has a MIME type of "image/jpeg".

Eli Cochran added a comment - 27-Nov-2007 15:27
Bad, Microsoft, Bad. No cookie for you.

image/jpeg is supposed to be used for all jpeg, jpe, and jpg files. Actually not sure who's to blame here but it feels like the browser.
Question is, are you going to make Gallery treat both as images or recast the MIME type in Resources?

Ray Davis added a comment - 27-Nov-2007 16:56
Oddly enough, my search for "IE 7 image-jpg" only turned up complaints that IE 7 doesn't know what to _do_ with the "image/jpg" MIME type. Nevertheless, inspecting the POST headers with the IE 7 DebugBar add-on (thanks for the tip, Eli!) shows that the browser is indeed giving that Content-Type to the server:

Content-Disposition: form-data; name="content_0"; filename="C:branchestrunk5D6A0C36-783F-4B01-8A4D-28B62434F37A.jpg"
Content-Type: image/jpg

I see two approaches to a fix:

A) Resources / ContentHosting should change to map the incorrect "image/jpg" to the correct "image/jpeg" before storing metadata

OR

B) Resources / ContentHosting / Image Gallery should update their configurations to accept "image/jpg" as a legitimate image Content-Type.

Since B is easily within my power for Image Gallery, I've picked that one. As of revision 43839, JPEG uploads from IE 7 should show up in Image Gallery.

I'll add a minor bug against Resources so that they can decide what to do on their end.