chk125 Posted March 17, 2009 Share Posted March 17, 2009 I have built a HTM form to upload a file. It has validation line -- if( $myfile_Mime_Type != "image/jpeg" AND $myfile_Mime_Type != "image/pgpeg" AND $myfile_Mime_Type != "text/plain" ) Test 1 - upload a TXT file both IE and FF work fine (file upload is success) Test 2 - upload JPG file use FF to upload => return "Upload is done", use IE to upload => return "UPLOAD REJECTED [3]" Can anyone give me some advise (HTML form and PHP prog enclosed). Thanks a lot. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/149871-solved-same-html-upload-form-firefox-upload-ok-ie-upload-failed/ Share on other sites More sharing options...
rhodesa Posted March 17, 2009 Share Posted March 17, 2009 image/pgpeg should be image/pjpeg Link to comment https://forums.phpfreaks.com/topic/149871-solved-same-html-upload-form-firefox-upload-ok-ie-upload-failed/#findComment-787055 Share on other sites More sharing options...
chk125 Posted March 17, 2009 Author Share Posted March 17, 2009 Thanks. I have fixed it, and retest, but problem persists. FF => Upload is done. IE => UPLOAD REJECTED [3] Link to comment https://forums.phpfreaks.com/topic/149871-solved-same-html-upload-form-firefox-upload-ok-ie-upload-failed/#findComment-787065 Share on other sites More sharing options...
PFMaBiSmAd Posted March 17, 2009 Share Posted March 17, 2009 When you have a conditional test in your code that fails, echo out the actual value being tested so that you know what it contains. Link to comment https://forums.phpfreaks.com/topic/149871-solved-same-html-upload-form-firefox-upload-ok-ie-upload-failed/#findComment-787068 Share on other sites More sharing options...
chk125 Posted March 17, 2009 Author Share Posted March 17, 2009 The value from IE is "image/pjpeg" The value form Firefox is "image/jpeg" I must done something wrong when doing the retest according to rhodesa's advice. Thanks PFMaBiSmAd and rhodesa. Problem solved. Link to comment https://forums.phpfreaks.com/topic/149871-solved-same-html-upload-form-firefox-upload-ok-ie-upload-failed/#findComment-787083 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.