vikela Posted March 25, 2009 Share Posted March 25, 2009 using a code to upload images some jpeg files are failing to upload!i can load jpg,bmp,and gif.what could be the problem?here is a piece of the code. function is_valid_type($file) { // This is an array that holds all the valid image MIME types $valid_types = array("image/jpg", "image/jpeg", "image/bmp", "image/gif"); if (in_array($file['type'], $valid_types)) return 1; return 0; } Link to comment https://forums.phpfreaks.com/topic/151046-solved-failing-to-upload-jpeg-images/ Share on other sites More sharing options...
Mark Baker Posted March 25, 2009 Share Posted March 25, 2009 Watch out for uploads via IE which likes a MIME type of image/pjpeg (Photo jpeg) instead of image/jpeg Link to comment https://forums.phpfreaks.com/topic/151046-solved-failing-to-upload-jpeg-images/#findComment-793517 Share on other sites More sharing options...
vikela Posted March 25, 2009 Author Share Posted March 25, 2009 Watch out for uploads via IE which likes a MIME type of image/pjpeg (Photo jpeg) instead of image/jpeg thanks the image/pjpeg solved it Link to comment https://forums.phpfreaks.com/topic/151046-solved-failing-to-upload-jpeg-images/#findComment-793579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.