Set profile picture upload size limit on cakephp

I have an application for examination, I want students to be able to upload profile pictures I have done with the upload but I want to set size limit, I don’t want them to upload picture that is above 50kb in size. What is the code to do that?