Libary Multi-Upload uncompatible initalization |
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.
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).
You could give a try to my library: https://github.com/avenirer/MY_Upload
Thanks. Website: http://avenir.ro
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>
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 /> Website: http://avenir.ro
Yes, the initialize method just has to match the method in the CI library:
Code: public function initialize(array $config = array(), $reset = TRUE)
(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 |
Welcome Guest, Not a member yet? Register Sign In |