How to set maximum upload pictures size limit

Hi guys, please I need help on how to set users to upload image file that is not more than 50kb presently users can upload images but I don’t want them to upload large images all I want is not more than 50kb on cakephp


you can set it by php.ini or ini_set

Thank you for your reply, I don’t want to set it using php.ini because I will be uploading other documents that are more than that 50kb, is there no way to achieve that although I have use some website that has that rules e.g some jobs website will say profile picture not more than 50kb cv unlimited size

  1. validate size before upload (js)
  2. on backend (beforeFilter) simple throw error if filesize > 50kb