php file upload type restriction

Posts 1–6 of 6 · Page 1 of 1
php file upload type restriction
hi guys i got this quote for php
is supposed to allow all kind of images,text files(.txt) and zip but the zip and txt are not working
any hint ?
what am i doing wrong
thank in advance for any help

if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "application/zip")
|| ($_FILES["file"]["type"] == "image/png")
|| ($_FILES["file"]["type"] == "image/bmp")
|| ($_FILES["file"]["type"] == "text documents/txt")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 8388608))
Small "Bug" in Chrome (Possibly Firefox as well) - It should work in IE however. Test in IE, let us know.
Yeah @NextGen1 your right chrome maybe buggie or something btw i knew that it works on internet explorer but i still see it as not working because i use chrome as my main browser and i guess most ppl do

edit
Hopefully this mime works for chrome for uploading zip files

Code:
($_FILES["file"]["type"] == "application/octet-stream")
Best thing to do it report it to Issue Tracking / Reports. {If it hasn't been reported yet}. There may be some work around{s}.
This defies all logic ._. internet explorer having something that doesn't work in chrome/ff? O_O
@Hell_Demon i know right
idk somehow i always test my php script using internet explorer first and then try others browser
maybe a bad habbit
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?