473,320 Members | 2,006 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,320 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 6260
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.