File Upload Class - 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: File Upload Class (/showthread.php?tid=65932) |
File Upload Class - bunoire14 - 08-11-2016 Hi, I am using the file upload class across my application to handle image and PDF uploads. I wondered, I have set a config file (upload.php) in my main config directory but I'm not sure if this sets globally the configuration for the class? Can anyone advise? I also want to be able to override the validation messages, is there any guidance on how to do this? Thanks in advance, RE: File Upload Class - Wouter60 - 08-11-2016 Regarding the use of an upload.php config file, the documentation says this: If you prefer not to set preferences using the above method, you can instead put them into a config file. Simply create a new file called upload.php, add the $config array in that file. Then save the file in: config/upload.php and it will be used automatically. You will NOT need to use the $this->upload->initialize() method if you save your preferences in a config file. To overrride the default error messages, simply copy the file upload_lang.php from the folder system/language/english to application/language/<your language>, and change the messages to what you want. |