473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

FireFox jpeg, Internet Explorer pjpeg

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

Jun 21 '07 #1
2 6266
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

DLHowdy,
DL>
DLI have a simple file uploader in a form, and I take the image and
DLcheck for the file extension. Now I when upload a jpg image in
DLFireFox the content type is image/jpeg. When I upload the SAME EXACT
DLfile from the same location using Internet Explorer it registers as
DLa image/pjpeg. My understanding is that IE translates it to a
DLprogressive jpeg and FF doesn't care. Any speacial reason why? Can I
DLavoid this in the script so it treats all files exactly how they
DLare? Are there other file formats that IE and FF conflict on?
DL>
DLDim fn As String = f.PostedFile.ContentType
DLIf fn <"image/jpeg" And fn <"image/bmp" And fn
DL<>
DL"image/png" And fn <"image/gif" Then
DLThanks,
DL>
DLDavid Lozzi
DL>
Jun 21 '07 #2
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

"David R. Longnecker" <dl*********@community.nospamwrote in message
news:46************************@msnews.microsoft.c om...
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

DLHowdy,
DLDLI have a simple file uploader in a form, and I take the image and
DLcheck for the file extension. Now I when upload a jpg image in
DLFireFox the content type is image/jpeg. When I upload the SAME EXACT
DLfile from the same location using Internet Explorer it registers as
DLa image/pjpeg. My understanding is that IE translates it to a
DLprogressive jpeg and FF doesn't care. Any speacial reason why? Can I
DLavoid this in the script so it treats all files exactly how they
DLare? Are there other file formats that IE and FF conflict on?
DLDLDim fn As String = f.PostedFile.ContentType
DLIf fn <"image/jpeg" And fn <"image/bmp" And fn
DL<>
DL"image/png" And fn <"image/gif" Then
DLThanks,
DLDLDavid Lozzi
DL>
Jun 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: kinne | last post by:
The following code is supposed to reverse the date in "yyyy-mm-dd" format, but it produces different results in Firefox 1.0 and in Internet Explorer 6SP1. In Firefox, the result is correct...
14
by: catorcio | last post by:
I'm trying to have some text in my page changed by clicking a button. Googleing around I've discovered that innerText doesn't work with every browser, so I've switched to innerHTML. It works fine...
0
by: Johann Blake | last post by:
In my need to decode a JPEG 2000 file, I discovered like many that there was no functionality for this in the .NET Framework. Instead of forking out a pile of cash to do this, I came up with the...
0
by: Daniel Chait | last post by:
I have an ASP.NET page with an HtmlInputFile control. On certain machines, when a user uploads a jpeg image, the uploaded file has a MIME type of image/jpeg and on others the uploaded file has a...
11
by: minnesotti | last post by:
Hi there, I subscribed to a photographic pictures-hosting website which is heavy on JavaScript. My preferred latest browser Mozilla Firefox does not work with it -- no pictures are displayed and...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
3
by: macca | last post by:
Hi people! I'm having a problem with a file upload script that I'm writing. It works with Firefox but not Internet explorer. When the form is submitted(to it's self) it check for a file upload...
17
by: ur.solame | last post by:
I have an image being generated by a PHP script-- I didn't write the code-- and the image itself is in a database. I've discovered that there is a big discrepancy between how the images appear...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.