show alert box when user select non accepted file in danialfarid/ng-file-upload plugin


  • I am using danialfarid/ng-file-upload plugin ,I set the ngf-select
    directive to .doc,.pdf extension. Its working fine.

  • Problem is if a user select .png or jpg file, I want to show an alert
    box to user that this file type are not accepted. Thanks for in


Something like this:

<div ngf-select ngf-pattern="'.png,.jpg'" ng-model="file">

<div class="alert" ng-show="file.$error === 'pattern'">file type is not accepted. Acceptable files: {{file.$errorParam}}</div>

Answered By – danial

Answer Checked By – Gilberto Lyons (AngularFixing Admin)

Leave a Reply

Your email address will not be published.