Welcome Guest, Not a member yet? Register   Sign In
Server side Validation for image upload
#1

[eluser]MASS MASS[/eluser]
I am using upload library to upload image........

$config['allowed_types'] = 'gif|png|jpg';
$config['max_size'] = '10000';
$config['max_width'] = '200';
$config['max_heigth'] = '200';
$config['upload_path'] = './uploads/'
$this->load->library('upload', $config);


while user uploading image........user should upload minimum widht and minimum height

for this how to do.........

CI have only max_width and max_heigth.........
#2

[eluser]Unknown[/eluser]
I am having the same issue.
Is there an easy way to check minimum width/height of uploaded images ?
#3

[eluser]drewbee[/eluser]
The PHP function getimagesize();
It will return an array of several attributes of the image, including the height and width.

http://us3.php.net/manual/en/function.getimagesize.php




Theme © iAndrew 2016 - Forum software by © MyBB