Welcome Guest, Not a member yet? Register   Sign In
is it possible to configure upload for minimum with and height ?
#1

[eluser]ludo31[/eluser]
Hello ;

I don't know how to configure that , I would like to upload a pictures for example ; and I allow all pictures superior of 300 x 300 for examples so when I try to see the Upload.php in libraries and I don't see min_width and min_height but max_size and max_with and max_height

so I configure like that :

Code:
'upload_path'=>'./image/annonce/',
                     'allowed_types'=>'gif|jpg|jpeg|png',
                     'max_size'=>0,
                      'max_width'=>0,
                       'max_height'=>0,
                     'encrypt_name'=>true
is it possible to configure the min ??
or I must indicate in my form the dimension 300x300

thanks
#2

[eluser]Aken[/eluser]
This logic is not built into the file upload class. You have a couple options:

1) Extend the class and add that functionality.

2) Use code in your controller, or separate library or helper, to validate the file further after it has been uploaded. If it fails, you can delete the file and return an error.




Theme © iAndrew 2016 - Forum software by © MyBB