Libary Multi-Upload uncompatible initalization - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Libary Multi-Upload uncompatible initalization (/showthread.php?tid=1289) |
Libary Multi-Upload uncompatible initalization - papstbenr - 02-25-2015 Hey, I want to work with this libary: https://github.com/stvnthomas/CodeIgniter-Multi-Upload But I get the following error: Quote:Message: Declaration of MY_Upload::initialize() should be compatible with CI_Upload::initialize(array $config = Array, $reset = true) My Code: PHP Code: $config2['upload_path'] = './uploads/estate_images'; Is the problem caused by CI3? Anyone knows another libary which is working with CI3? Best regards. RE: Libary Multi-Upload uncompatible initalization - mwhitney - 02-25-2015 This is just a difference in the error reporting level in CI3. You may be able to use the library by simply changing the signature of the method as implied by the error message. Since the method doesn't seem to call the parent, it's really up to you whether the second parameter is implemented properly in the extending class (though you may want to document it in case you, or someone else, may need to update your site in the future). RE: Libary Multi-Upload uncompatible initalization - Avenirer - 02-26-2015 You could give a try to my library: https://github.com/avenirer/MY_Upload Thanks. RE: Libary Multi-Upload uncompatible initalization - papstbenr - 02-26-2015 What do you mean with "by simply changing the signature of the method"? Just adding $reset to the initialize methode? (02-26-2015, 01:58 AM)Avenirer Wrote: You could give a try to my library: https://github.com/avenirer/MY_Upload Hey, I had tried it, but this won't work with Inputs like this or? Code: <form> RE: Libary Multi-Upload uncompatible initalization - Avenirer - 02-26-2015 Why wouldn't it work? Behind the scenes (on server side), this: PHP Code: <input type="file" name="image[]"> ... is the same as this: PHP Code: <input type="file" name="image[]" multiple /> RE: Libary Multi-Upload uncompatible initalization - mwhitney - 02-26-2015 Yes, the initialize method just has to match the method in the CI library: Code: public function initialize(array $config = array(), $reset = TRUE) RE: Libary Multi-Upload uncompatible initalization - chanthoeunkim - 05-06-2015 (02-26-2015, 10:43 AM) pid=\5884' Wrote:mwhitneyYes, the initialize method just has to match the method in the CI library: Hello, I have the same problem while uploading and I added $reset == TRUE it's still not working. I got this error message: An Error Was Encountered The configuration file upload.php does not exist. I used CI3. This is my code: Code: public function multi_upload($rename = TRUE) Anyone can help? Thanks |