dist/ng-image-upload-template-in.js
function imageFilter (item /*{File|FileLikeObject}*/, options) {
      var type = '|' + item.type.slice(item.type.lastIndexOf('/') + 1) + '|';
      if ('|jpg|png|jpeg|bmp|gif|'.indexOf(type) === -1) {
        var err = new Error('File extension not supported (' + type + ')');
        vm.onUploadFinished(err);
        throw err;
      }

      return '|jpg|png|jpeg|bmp|gif|'.indexOf(type) !== -1;
    }
function imageFilter (item /*{File|FileLikeObject}*/, options) {
      var type = '|' + item.type.slice(item.type.lastIndexOf('/') + 1) + '|';
      if ('|jpg|png|jpeg|bmp|gif|'.indexOf(type) === -1) {
        var err = new Error('File extension not supported (' + type + ')');
        vm.onUploadFinished(err);
        throw err;
      }

      return '|jpg|png|jpeg|bmp|gif|'.indexOf(type) !== -1;
    }
function imageFilter ( item /*{File|FileLikeObject}*/ , options ) { var type = '|' + item . type . slice ( item . type . lastIndexOf ( '/' ) + 1 ) + '|' ; if ( '|jpg|png|jpeg|bmp|gif|' . indexOf ( type ) === - 1 ) { var err = new Error ( 'File extension not supported (' + type + ')' ) ; vm . onUploadFinished ( err ) ; throw err ; } return '|jpg|png|jpeg|bmp|gif|' . indexOf ( type ) !== - 1 ; }
Set up filters to check that images should be uploaded before uploading them Filters out the items that are not pictures
Set up filters to check that images should be uploaded before uploading them Filters out the items that are not pictures