Unable to upload doc or PDF files - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Unable to upload doc or PDF files (/showthread.php?tid=69368) |
Unable to upload doc or PDF files - gokulakrishna9 - 11-09-2017 // Configuration information "conference_brochure"=>array( "fields"=>array( "field_name"=>"conference_brochure", "configuration"=>array( "upload_path"=>"./assets/company_site_images/", "allowed_types"=>"gif|jpg|png|chm|doc|dcom|docx|dot|dotx|hwp|odt|pdf|pub|rtf|xps|key|odp|pps|ppsx|ppt|pptm|pptx|PDF|DOC|XML|DOCX", "file_ext_tolower"=>"TRUE", "overwrite"=>"TRUE", "max_size"=>"5120" ) ) ), I have tried various combinations of MIME types with no success. I am able to upload images. Codeigniter 3 on PHP 7. Thanks for the help. RE: Unable to upload doc or PDF files - gokulakrishna9 - 11-15-2017 Changed this: $this->load->library('upload', $config); to this: $this->load->library('upload'); $this->upload->initialize($config); And it worked. Source: https://stackoverflow.com/questions/27201741/upload-pdf-csv-and-other-file-type-in-codeigniter |