Problems with upload class - 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: Problems with upload class (/showthread.php?tid=9750) |
Problems with upload class - El Forum - 07-07-2008 [eluser]Clooner[/eluser] Hi All, The upload class worked fine for me before but not on my latest project where I am trying to upload an csv file. I keep hitting the following error: The filetype you are attempting to upload is not allowed. I am using CI 1.6.3 that includes the csv file as mime type and I also set the upload config with $config['allowed_types'] = 'csv'; and I also set enctype="multipart/form-data" in the form header. and last but not least I call the function using if (!$this->upload->do_upload($fieldname)) Hope someone has some suggestions for me to make this work Thanks, Jeroen Problems with upload class - El Forum - 07-07-2008 [eluser]Seppo[/eluser] Try echoing $_FILES[$fieldname]['type'], then go to config/mimes.php and look for CSV extension and add the type you are getting. Problems with upload class - El Forum - 07-20-2008 [eluser]Asinox[/eluser] ok this? 'flv' => 'video/x-flv' ? |