• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
file upload problem in IE

#1
[eluser]quest13[/eluser]
When I tried to upload the image in IE , the following code is not recognising JPG format in IE. But the same is working in Firefox.

Any body can help me on this ?


Code:
if ((($_FILES["uploadedfile"]["type"] == "image/gif")
            || ($_FILES["uploadedfile"]["type"] == "image/jpeg")
            || ($_FILES["uploadedfile"]["type"] == "image/png"))
{....

thanks

#2
[eluser]pistolPete[/eluser]
Why don't you use the file upload library? http://ellislab.com/codeigniter/user-gui...ading.html

What type do you get when you upload using IE? var_dump() the $_FILES array.

#3
[eluser]quest13[/eluser]
Thanks for the reply. I will try out with upload library

however, I got this when I did var_dump

string(11) "image/pjpeg" for
Code:
(if (($_FILES["uploadedfile"]["type"] == "image/jpg")

what does it mean ?

#4
[eluser]pistolPete[/eluser]
IE reports the file's mime type as "image/pjpeg".

If you use the upload library, this mime type is already in mimes.php, so uploading should work in IE.

#5
[eluser]deepydee[/eluser]
hallo, how to set 3gp in mimes type??


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.