CodeIgniter Forums
Why doesn't the file upload allowed_types work? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Why doesn't the file upload allowed_types work? (/showthread.php?tid=18622)



Why doesn't the file upload allowed_types work? - El Forum - 05-12-2009

[eluser]dallen33[/eluser]
I'm allowing these types:
Code:
gif|jpg|png|doc|pdf|psd|eps|jpeg|bmp|tiff|rtf|txt

Nothing fancy going on there. Yet, I can't upload EPS files (they are denied), I can only upload SOME jpgs, some are denied. Is there something wrong with this class?


Why doesn't the file upload allowed_types work? - El Forum - 05-12-2009

[eluser]dallen33[/eluser]
I found another post that "fixed" the situation for me by allowing ALL file types:

http://ellislab.com/forums/viewthread/112976/

But I'm still not sure why some PDFs, all EPSs, some JPGs are not being accepted.


Why doesn't the file upload allowed_types work? - El Forum - 05-12-2009

[eluser]Thorpe Obazee[/eluser]
You can probably check on this too...

http://ellislab.com/forums/viewthread/105777/


Why doesn't the file upload allowed_types work? - El Forum - 05-13-2009

[eluser]Bogdan Tanase[/eluser]
Most likely it has to do with the mime type. Each browser sends a different mime-type identification sometimes files of the same type are identified different. You need to edit the config/mimes.php file and add each type there.

IMHO better hack the library and disable the mime check;