I need to upload a kml file in my project using CI but the file type is not allowed. I tried with kml and xml both but it throws error msg “The filetype you are attempting to upload is not allowed.”. Is there any additional configuration needed with CI to upload files ?
Thank you in advance.
There was a bug in file upload class – see this thread for help – http://codeigniter.com/forums/viewthread/204725/
You can test if you can upload the file successfully by using
so if it works then it perhaps you can stick with it and then filter file mime-types using $_FILE attribs or you could check file extension using something like
$ext = pathinfo($filename, PATHINFO_EXTENSION);and compare with the required ones or just follow the suggestions in above thread.Best is to upgrade to the latest version if you are using an older version of CI