RE: [PHP] Re: jpeg Uploader issue

2004-01-13 Thread Mike R



 On Mon, 12 Jan 2004, Mike R wrote:
   i had a problem like the one you descriped. The problem was quite
   simple. In my case everything worked fine with Windows-Web-Browsers
   but not with MAC-Browsers. Check the value of the filetype variable.
   There might be differences between different plattforms.
 
  I'm sorry to sound stupid here, but what do you mean by that? :\

 This occurred to me too, but I couldn't find the thread to respond...

 I think he means that the server may be returning an incorrect
 Content-type header for jpeg images. IE is especially notorious for
 (incorrectly) ignoring this information if it can match the file extension
 to a file type registered on the local machine.

 In an ideal world, all http clients should respect the Content-type header
 to determine the file type. A .jpg should be Content-type: image/jpeg

 Normally this is set in your server configuration. However, if they are
 being served by a script that is outputting the raw data to the client,
 you may need to send this header from the script.  That would explain why
 Mac users see the problem only with uploaded images (did you say?).

 In PHP you would set the Content-type header like so:
 header(Content-type: image/jpeg);

So, should I write that header to the actual image file prior to the image
itself?

:)

I'll admit that while IE is incorrect for ignoring this information, I think
it is also important for browsers to be flexible enough to understand what a
file means to make the experience for the end user smooth.

Thanks!

-Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: jpeg Uploader issue

2004-01-12 Thread Mike R

 i had a problem like the one you descriped.
 The problem was quite simple. In my case everything
 worked fine with Windows-Web-Browsers but not with
 MAC-Browsers.
 Check the value of the filetype variable. There might be
 differences between different plattforms.

I'm sorry to sound stupid here, but what do you mean by that? :\

:)

Thanks,

-Mike
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: jpeg Uploader issue

2004-01-12 Thread Kelly Hallman
On Mon, 12 Jan 2004, Mike R wrote:
  i had a problem like the one you descriped. The problem was quite
  simple. In my case everything worked fine with Windows-Web-Browsers
  but not with MAC-Browsers. Check the value of the filetype variable.
  There might be differences between different plattforms.
 
 I'm sorry to sound stupid here, but what do you mean by that? :\

This occurred to me too, but I couldn't find the thread to respond...

I think he means that the server may be returning an incorrect
Content-type header for jpeg images. IE is especially notorious for
(incorrectly) ignoring this information if it can match the file extension
to a file type registered on the local machine.

In an ideal world, all http clients should respect the Content-type header
to determine the file type. A .jpg should be Content-type: image/jpeg

Normally this is set in your server configuration. However, if they are
being served by a script that is outputting the raw data to the client,
you may need to send this header from the script.  That would explain why
Mac users see the problem only with uploaded images (did you say?).

In PHP you would set the Content-type header like so:
header(Content-type: image/jpeg);

-- 
Kelly Hallman
// Ultrafancy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: jpeg Uploader issue

2004-01-12 Thread Mike R



 On Mon, 12 Jan 2004, Mike R wrote:
   i had a problem like the one you descriped. The problem was quite
   simple. In my case everything worked fine with Windows-Web-Browsers
   but not with MAC-Browsers. Check the value of the filetype variable.
   There might be differences between different plattforms.
 
  I'm sorry to sound stupid here, but what do you mean by that? :\

 This occurred to me too, but I couldn't find the thread to respond...

 I think he means that the server may be returning an incorrect
 Content-type header for jpeg images. IE is especially notorious for
 (incorrectly) ignoring this information if it can match the file extension
 to a file type registered on the local machine.

 In an ideal world, all http clients should respect the Content-type header
 to determine the file type. A .jpg should be Content-type: image/jpeg

 Normally this is set in your server configuration. However, if they are
 being served by a script that is outputting the raw data to the client,
 you may need to send this header from the script.  That would explain why
 Mac users see the problem only with uploaded images (did you say?).

 In PHP you would set the Content-type header like so:
 header(Content-type: image/jpeg);

So, should I write that header to the actual image file prior to the image
itself?

:)

I'll admit that while IE is incorrect for ignoring this information, I think
it is also important for browsers to be flexible enough to understand what a
file means to make the experience for the end user smooth.

Thanks!

-Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php