image minimum width check - 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: image minimum width check (/showthread.php?tid=57863) |
image minimum width check - El Forum - 04-19-2013 [eluser]Uresh Patel[/eluser] HI, How to check image minimum height and width before uploading File. e.g: My requirement is user must upload image more that 320 W x 240 H I found that in lib : max_height and max_width Please help...... image minimum width check - El Forum - 04-19-2013 [eluser]Uresh Patel[/eluser] getimagesize($config['upload_path'].'/'.$image_name); image minimum width check - El Forum - 04-19-2013 [eluser]TheFuzzy0ne[/eluser] You could also extend the Upload library to allow for extra configuration options, although your method certainly looks simpler. image minimum width check - El Forum - 04-21-2013 [eluser]Uresh Patel[/eluser] HI, I tried using this "getimagesize" but it only works after file uploading done.But i need to check before file uploading.If it not fits in criteria then no need to upload that file... [quote author="TheFuzzy0ne" date="1366387040"]You could also extend the Upload library to allow for extra configuration options, although your method certainly looks simpler.[/quote] image minimum width check - El Forum - 04-22-2013 [eluser]jairoh_[/eluser] $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $this->load->library('upload', $config); |