Jump to content

working in safri but not in iexplorer ?????


son.of.the.morning

Recommended Posts

Your error checking and error reporting logic in your code should tell you why the upload is failing so that you don't have to guess.

 

Best guess is that you are checking the mime type and different browsers send different mime types for the same file (actually some send a more correct mime type, others send a more general mime type.)

That doesn’t seem to be the problem, do you think it has something to do with the file extension, because when it's not working for me on IE it's saying the error which i coded to come up when the file extension is invalid. 

If your current code is related to the upload code you have posted on the forum previously, the code that is testing the ['type'] element of the $_FILES array is not testing the file extension, it is testing the mime type that the browser supplies and someone previously stated in this thread why you might get different values from different browsers for the same file.

 

You would both need to display the value you are receiving as part of the error message and add it as one of the permitted types.

I read up on it got it sorted by extenend the possible correct values...

insead of this

 if  ((($_FILES["file"]["type"] == "image/jpeg")[code=php:0] /// just having one possible extention
to ....
[code=php:0]if  ((($_FILES["file"]["type"] == "image/jpeg")
||($_FILES["file"]["type"] == "image/jpg")
||($_FILES["file"]["type"] == "image/png")
||($_FILES["file"]["type"] == "image/x_png")
||($_FILES["file"]["type"] == "image/pjpeg")))

[/code]

 

works like a charm now, thanks for help much appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.