CodeIgniter Forums

Full Version: Unable to upload doc or PDF files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
// 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.
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/2720...odeigniter