0

Is there any specific way how we can restrict upload image ratio to 16:9 in cakephp 2.3?

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
  • Not really but PHP provides functions to handle that. With getimagesize(), you will be able to manually calculate this ratio. http://php.net/manual/fr/function.getimagesize.php – richerlariviere Jul 17 '15 at 13:10
  • 1
    I know this is not about the question, but if you're new to CakePHP and you want to implement a image upload module, I have a tip for you: Keep the upload code in the model. Use model's callbacks (beforeSave(), afterSave()) to manage your upload. Remember that: Fat model, tiny controller. – richerlariviere Jul 17 '15 at 13:14

1 Answers1

0

I don't think you did any research on this yourself... So here is just the basic concept:

Community
  • 1
  • 1
floriank
  • 25,546
  • 9
  • 42
  • 66