FireFox jpeg, Internet Explorer pjpeg

D

David Lozzi

Howdy,

I have a simple file uploader in a form, and I take the image and check for
the file extension. Now I when upload a jpg image in FireFox the content
type is image/jpeg. When I upload the SAME EXACT file from the same location
using Internet Explorer it registers as a image/pjpeg. My understanding is
that IE translates it to a progressive jpeg and FF doesn't care. Any
speacial reason why? Can I avoid this in the script so it treats all files
exactly how they are? Are there other file formats that IE and FF conflict
on?


Dim fn As String = f.PostedFile.ContentType
If fn <> "image/jpeg" And fn <> "image/bmp" And fn <>
"image/png" And fn <> "image/gif" Then

Thanks,

David Lozzi
 
D

David R. Longnecker

David-

Heh, yeah, I ran into that too designing a photo gallery application for
my blog. I just ended up accepting both JPEG and PJEPG as acceptible mime
types. As far as any other formats, no, I'm not aware of any others. I've
also never found any exact reasons why MSFT decided to force the progressive
jpeg format beyond the "apparent" faster loading, though, as you're doing,
that doesn't affect uploading using server controls, just display.

-dl

--
David R. Longnecker
http://blog.tiredstudent.com

DL> Howdy,
DL>
DL> I have a simple file uploader in a form, and I take the image and
DL> check for the file extension. Now I when upload a jpg image in
DL> FireFox the content type is image/jpeg. When I upload the SAME EXACT
DL> file from the same location using Internet Explorer it registers as
DL> a image/pjpeg. My understanding is that IE translates it to a
DL> progressive jpeg and FF doesn't care. Any speacial reason why? Can I
DL> avoid this in the script so it treats all files exactly how they
DL> are? Are there other file formats that IE and FF conflict on?
DL>
DL> Dim fn As String = f.PostedFile.ContentType
DL> If fn <> "image/jpeg" And fn <> "image/bmp" And fn
DL> <>
DL> "image/png" And fn <> "image/gif" Then
DL> Thanks,
DL>
DL> David Lozzi
DL>
 
D

David Lozzi

Yes, we are now accepting both formats as well. Funny thing, I am now making
my self run primarily on FF for the sake of "what's the big deal" so I can
say I've done it, and FF works fine. This was quite agravating to find!

Thanks

David Lozzi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top