CI3 Multiple file upload: Custom error message ($this->upload->display_errors()) |
Hi All!,
My multiple file uploading is working just fine. But how do i customize/alter file upload error message(s)? let say i have 4 files uploads, 2 files are invalid with each corresponding errors like: Quote:- The filetype you are attempting to upload is not allowed. what would i like is to customize messages some thing like: Quote:- The filetype (of file2.xxx) you are attempting to upload is not allowed (only jpg|gif|png accepted). with these kind of "error" messaging, it would be easy for user's to identify which file is having issues. NOTE: I'm not using callback yet i hope anyone can help... thanks much in advanced, vrsotto
There is not multiple file upload library in CodeIgniter... as I know of... So if you have problems with this you can at any time show us your code Or... you can try to extend the upload library. I already tried that. You can see mine here: https://github.com/avenirer/MY_Upload
Website: http://avenir.ro
(04-22-2015, 11:16 PM)Avenirer Wrote: There is not multiple file upload library in CodeIgniter... as I know of... So if you have problems with this you can at any time show us your code Or... you can try to extend the upload library. I already tried that. You can see mine here: https://github.com/avenirer/MY_Upload basically i followed your tutorial regarding multiple uploading (http://avenir.ro/codeigniter-tutorials/u...deigniter/) with some little modification. I have a MY_Controller class where i wrap the methods. Here the code doing multiple uploads: PHP Code: public function multi_file_upload($field_file_name = '', $config = array()) { PHP Code: public function single_file_upload($field_file_name, $config = array()) { So to use the functionality PHP Code: public function index() { As of now i'm looking a way to manage custom file upload error...
04-23-2015, 05:51 AM
(This post was last modified: 04-23-2015, 05:51 AM by Avenirer. Edit Reason: although... )
GG. Also, I did a pull request on CodeIgniter's github repo: https://github.com/bcit-ci/CodeIgniter/pull/3797. Hope it will get approved. If not, you can at any time change the system files yourself, although I won't encourage you to do that...
Website: http://avenir.ro
(04-23-2015, 05:51 AM)Avenirer Wrote: GG. Also, I did a pull request on CodeIgniter's github repo: https://github.com/bcit-ci/CodeIgniter/pull/3797. Hope it will get approved. If not, you can at any time change the system files yourself, although I won't encourage you to do that... Thanks for pointing me the files from the /system. but, yeah its not wise to touch the core. i hope your pull request granted. if i don't see any other way, i maybe force to slightly modify the core files in the system. Thanks again! |
Welcome Guest, Not a member yet? Register Sign In |