CodeIgniter Forums

Full Version: File upload bug!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Why my upload method works fine in localhost but when I run the same method in the production server throws "filetype" validation error?

$config['upload_path']   = APPPATH . 'upload/';
$config['allowed_types'] = 'xls|csv|xlsx';
$this->load->library('upload', $config);
if ( $this->upload->do_upload('files') ) {
  //do something
return $this->validationErrors(array('error' => $this->upload->display_errors()));