![]() |
An allowed_types and Upload issue - 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: An allowed_types and Upload issue (/showthread.php?tid=51552) |
An allowed_types and Upload issue - El Forum - 05-08-2012 [eluser]Riente[/eluser] Hello everyone, I have a problem. I indicate two allowed file types $config[‘allowed_types’] = ‘gif|jpg’; The point is only the first one works fine. I mean that I can upload gif-files successfully, and when trying to upload a jpg-file I get an error “The filetype you are attempting to upload is not allowed”. If I write $config[‘allowed_types’] = ‘jpg|gif’; (i.e. swap their positions) then I upload jpg-files just fine, but have problems uploading gif-files. Here’s my code: Code: $this->load->library('upload'); What can be the problem? An allowed_types and Upload issue - El Forum - 05-09-2012 [eluser]InsiteFX[/eluser] If I remember correct I think there was a problem with this! You can download the new dev3.0 version here which should have the fix. CodeIgniter GitHub - Dev3.0 An allowed_types and Upload issue - El Forum - 05-09-2012 [eluser]Riente[/eluser] Thank you, I'll try An allowed_types and Upload issue - El Forum - 05-09-2012 [eluser]Chathuranga Tennakoon[/eluser] try with below code. it should work Code: $config['allowed_types'] = 'gif|jpg|jpeg'; An allowed_types and Upload issue - El Forum - 05-10-2012 [eluser]Riente[/eluser] [quote author="Chathuranga Tennakoon" date="1336628778"]try with below code. it should work Code: $config['allowed_types'] = 'gif|jpg|jpeg'; no, that didn't help, thanks anyway An allowed_types and Upload issue - El Forum - 05-10-2012 [eluser]beatryder[/eluser] Could it be that your GIF has some bad headers? An allowed_types and Upload issue - El Forum - 05-10-2012 [eluser]Riente[/eluser] No, in fact, I can upload both gif and jpg files, but separately, i.e. it allows only the first filetype in the row "gif|jpg". As I have said, if I change it to "jpg|gif" then I can upload only jpg-files. If "gif|jpg" - only gif-files... |