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; } Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.