I’m using the $form->addField(‘imageField’ … to allow a user to upload a photo into a form. It is working well unless the user tries to upload an image that is too large. In this case a pop-up Is displayed with the following displayed:
Warning : POST Content-Length of 16276669 bytes exceeds the limit of 8388608 bytes in Unknown on line 0’
A json representation of the value I am returning from the onUpload function is also displayed in the dialog.
When I click outside the dialog to close it, my form is displayed but the error handling that I specified in the return from the onUpload handler wasn’t executed.
I’d appreciate any help getting around this issue as well as any suggestions for how to check the file size on the client size.