我正在寻找一种重置文件选择的方法,以防用户选择无效文件。
从gitHub 上的这个问题来看,您似乎需要取消绑定事件才能重置文件选择,现在,我该如何在 AngularJS 中做这样的事情?
标记:
<form name="applyForm" data-file-upload="model.uploadOptionsResume" action="{{model.application_url}}" method="{{model.method}}" enctype="multipart/form-data">
   <fieldset>
     <input type="file" data-ng-model='model.formData.resume' name="resume" data-ng-disabled="" data-valid-file data-my-validate data-value-required="true">
     <submit data-ng-disabled="applyForm.$invalid || innerLoader" class="btn btn-primary" style="width:99%;"  data-ng-click="submit(); model.submitFormApplicant()">
                            Apply
                            <!-- submitFormApplicant() check if a file is selected and if not does regular submit -->
                        </submit>
    </fieldset>
</form>