Image upload not working in IE, working fine in FF

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jawedshamshedi
Forum Commoner
Posts: 35
Joined: Fri May 16, 2008 1:17 am
Location: India
Contact:

Image upload not working in IE, working fine in FF

Post by jawedshamshedi »

Hi to all,

I am uploading a image in my site with simple move upload, its working fine in FF but when I am using the same code in IE its giving a error page not found. I am uploading four images simultaneously.

Thanks in advance

Jawed
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Image upload not working in IE, working fine in FF

Post by jaoudestudios »

Wonderful IE working it's f**king magic again!!!! - Sorry, I hate IE and how useless it is, and I include microsoft in that hate list :wink: - but thats another story.

Is the image a jpeg? (or jpeg)

IE and all its wonderfulness renames the extension of a jpeg|jpg and prepends it with a 'p'. So you will get pjpeg|pjpg. F**k knows why?!?!?!?

I am assuming you are checking for a valid extension? If so then you need to add these IE only extensions to the safe/white list.
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Re: Image upload not working in IE, working fine in FF

Post by jmut »

jaoudestudios wrote:Wonderful IE working it's f**king magic again!!!! - Sorry, I hate IE and how useless it is, and I include microsoft in that hate list :wink: - but thats another story.

Is the image a jpeg? (or jpeg)

IE and all its wonderfulness renames the extension of a jpeg|jpg and prepends it with a 'p'. So you will get pjpeg|pjpg. F**k knows why?!?!?!?

I am assuming you are checking for a valid extension? If so then you need to add these IE only extensions to the safe/white list.
Didn't really know of this p appending things. I suggest using getimagesize() to determine type and validate if image is uploaded. Relying on extensions is no quite right.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Image upload not working in IE, working fine in FF

Post by jaoudestudios »

jmut wrote:Didn't really know of this p appending things. I suggest using getimagesize() to determine type and validate if image is uploaded. Relying on extensions is no quite right.
Prepend not append.
Post Reply