nicdev / CodeIgniter-Multiple-File-Upload

Extension to the CodeIgniter Upload class to allow multiple files to be uploaded at once.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gives Fatal Error in Server

anuragrath opened this issue · comments

The code works perfectly when running in local system.
But when uploaded to server, gives the below Error:

Fatal error: Call to undefined method CI_Upload::do_multi_upload()

The code is straight forward:

$this->load->library('upload', $config);

$RetVal = $this->upload->do_multi_upload('userfile', TRUE, $PhotoList);

I figured out the solution for this.
We have to call the base class's constructor passing the config array as shown below.

function  MY_Upload($config = array())
{
    parent::__construct($config);
}

This works perfectly after that.

I'm having the same problem, works fine locally but on a server gives a me a fatal error. I have changed the 'application/libraries/MY_Upload.php' with
class MY_Upload extends CI_Upload { var $return_value; function MY_Upload($config = array()) { parent::__construct($config); }

however this hasn't changed anything. can anyone what i'm doing wrong?

@DDOONN Did you find solution for this? I am getting this error again with the latest version of CI when implementing with a REST Controller. Can you help me in finding the solution?

if i remember correctly it was because i didn't have the correct name casing for 'My_Upload.php' i had to wrestle with it for sometime before i found that simple thing out!

@DDOONN glad you found it. I'm really not maintaining this library anymore. If either one wants to take it over, please fork and have at it. Thanks!

@DDOONN I got this working. Issue was the same with case sensitiveness. Surprisingly all capital letters also not recognized by the server. Thanks for your input.
@nicdev I can take care of maintaining the library. Please add a note linking to the forked copy.