slpshtmike Posted April 25, 2006 Share Posted April 25, 2006 I have an image uploading script, and to ensure that the file being uploaded is an image I have the following if statement.if (($_FILES['imagefile']['type'] == "image/gif") OR ($_FILES['imagefile']['type'] == "image/jpg") OR ($_FILES['imagefile']['type'] == "image/jpeg") OR ($_FILES['imagefile']['type'] == "image/bmp") OR ($_FILES['imagefile']['type'] == "image/GIF") OR ($_FILES['imagefile']['type'] == "image/JPG") OR ($_FILES['imagefile']['type'] == "image/JPEG") OR ($_FILES['imagefile']['type'] == "image/BMP")){ (some code here)}else echo("error: invalid filetype");The script works fine when I try to upload images in Firefox, but when using IE I recieve the "error: invalid filetype" when I try to upload .jpg images. Has anyone ever encountered this before? Or have any idea why this is happening?Your help is much appreciated,Mike Quote Link to comment https://forums.phpfreaks.com/topic/8324-error-uploading-jpg-files-in-internet-explorer/ Share on other sites More sharing options...
slpshtmike Posted April 25, 2006 Author Share Posted April 25, 2006 I found the problem, ill post it here just incase anyone else runs into this.While firefox reads the mime-type of a jpeg image as "image/jpeg", internet explorer reads it as "image/pjpeg" Quote Link to comment https://forums.phpfreaks.com/topic/8324-error-uploading-jpg-files-in-internet-explorer/#findComment-30371 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.