Validating blocks with particular file extensions

Permalink
I have created a custom block in which only image can be uploaded so how do I restrict uploading pdf or epub or any other format....

 
hutman replied on at Permalink Reply
hutman
You should be able to limit which file is chosen from the File Manager to only images by doing this:

$al = Core::make('helper/concrete/asset_library');
echo $al->image('ccm-b-image', 'fID', t('Choose Image'), $file);