note 42447 modified in features.file-upload by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 13:55:35 +0000 |
| Subject: | note 42447 modified in features.file-upload by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79778@lists.php.net to get a copy of this message | ||
Note, that Opera sends mime type for jpeg as image/jpeg and not as image/pjpeg as IE and Netscape
do.
If you want to check that the uploaded fil is a jpeg file you have to check
<?php
if ("image/pjpeg" == $HTTP_POST_FILES["image"]["type"] ||
"image/jpeg" == $HTTP_POST_FILES["image"]["type"])
?>
if you don't want to exclude Opera users.
--was--
Note, that Opera sends mime type for jpeg as image/jpeg and not as image/pjpeg as IE and Netscape
do.
If you want to check that the uploaded fil is a jpeg file you have to check
if ("image/pjpeg" == $HTTP_POST_FILES["image"]["type"] ||
"image/jpeg" == $HTTP_POST_FILES["image"]["type"])
if you don't want to exclude Opera users.
http://php.net/manual/en/features.file-upload.php