ng-model don't update on video selecting

28 views Asked by At

i have to update an application built on AngularJS (v1.5.9)

One function is to let the possibilities to Update Video (it's actually working with picture)

Everything is Ok With Picture like that :

<div class="overlay" layout="column" layout-align="center center">
    <div class="md-raised for md-button md-ink-ripple">
        <label for="facultativeTwoUpload">Choose</label>
    </div>
    <input type="file" id="facultativeTwoUpload" name="facultativeTwo"
           ngf-select ngf-resize="{quality: .4}"
           ngf-validate="{size: {max: '3MB'}}"
           ng-model="$ctrl.parent.information.files.facultativeTwo"
           ngf-resize="{quality: .4}" ngf-accept="'.jpg, .jpeg, .png'"
           ngf-fix-orientation="true">
</div>

When i choose a picture , the model $ctrl.parent.information.files.facultativeTwo is well update but when i did the same thing with a Video like that :

<input ng-model="$ctrl.parent.information.files.videoUser"
       ngf-accept="video/mp4,video/x-m4v,video/*" 
       accept="video/mp4,video/x-m4v,video/*"  
       ngf-validate="{size: {max: '200MB'}}" type="file" id="videoUserUpload" 
       name="videoUser"
       ngf-select/>

My model is updated with an empty value (not null but nothing) and if i use ngf-model-invalid="invalidFile" invalidFile still empty Too :/

0

There are 0 answers