danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.6k forks source link

Cannot read property '$ngfValidations' of null while uploading .tiff files #2093

Open tomaszbob1 opened 5 years ago

tomaszbob1 commented 5 years ago

I get following error while i'm trying to upload .tiff file: image

I think the problem is while trying to resize .tiff file. My configuration: ngf-resize="{height: 177, quality: 1}" ngf-multiple="false" ngf-max-size="3MB" ngf-drop="ctrl.uploadImage($file, $invalidFiles)" ngf-select="ctrl.uploadImage($file, $invalidFiles)" ngf-drag-over-class="'dropspace__logo__image__active'" class="dropspace__logo__image"

It is nevermind that is specified ngf-pattern, ngf-accept or ngf-resize="{height: 177, quality: 1, pattern: 'image/*'}"

I want to validate file format in my js files before resizing it is possbile to do it ?