5514 Posts in 1733 Topics by 1219 members
|Go to End|
23 April 2013 at 10:29pm
I have this code inside function getCMSFields() for a page type to restrict image uploads to 1MB:
$image_validator = new Upload_Validator();
$photo1 = new ImageField('Photo1');
$fields->addFieldToTab( 'Root.Content.Images', $photo1 );
Seems to work just fine. The thing is when it fails, the CMS displays no explanation to the user. There also doesn't appear to be any action in Firebug.
Anyone know how to display a message to the user along the lines of "The file you tried to upload is too big"?
|Go to Top|