• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image minimum width check

#1
[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......

#2
[eluser]Uresh Patel[/eluser]
getimagesize($config['upload_path'].'/'.$image_name);

#3
[eluser]TheFuzzy0ne[/eluser]
You could also extend the Upload library to allow for extra configuration options, although your method certainly looks simpler.

#4
[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]

#5
[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);


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.