Jump to content

Error uploading .jpg files in Internet Explorer.


slpshtmike

Recommended Posts

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.