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] Quote Link to comment Share on other sites More sharing options...
rhodesa Posted March 17, 2009 Share Posted March 17, 2009 image/pgpeg should be image/pjpeg Quote Link to comment 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] Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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.