File Uploading Library. Error if image < 300 pixels? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: File Uploading Library. Error if image < 300 pixels? (/showthread.php?tid=33201) Pages:
1
2
|
File Uploading Library. Error if image < 300 pixels? - El Forum - 09-25-2010 [eluser]Sinclair[/eluser] Hi, Here is the extension to the Upload class. But it is not working... Code: <?PHP In the config.php I have added: Code: $config['min_width'] = '300'; What I need to do more to get this extension working? Best Regards, File Uploading Library. Error if image < 300 pixels? - El Forum - 09-30-2010 [eluser]Flynn[/eluser] Did you put Code: $config['min_width'] = '300'; in controller where you initialize upload library? It shouldn't be in config.php. File Uploading Library. Error if image < 300 pixels? - El Forum - 09-30-2010 [eluser]Sinclair[/eluser] Thanks for the reply. Yes. I have added the controllers: Code: $config['min_width'] = '300'; It is now working with the code above. Thanks for your help extending the class! Best Regards, File Uploading Library. Error if image < 300 pixels? - El Forum - 07-05-2012 [eluser]obay[/eluser] The code Sinclair provides has a missing line (CI 2.1.0). Be sure to add this line before initialize() ends: Code: // if a file_name was provided in the config, use it instead of the user input The file upload_lang.php should also be modified so as not to confuse the user. Add the text "or minimum": Code: $lang['upload_invalid_dimensions'] = "The image you are attempting to upload exceedes the maximum or minimum height or width."; |