2

I am using angular-file-upload in my angular project. https://github.com/danialfarid/angular-file-upload

<span ng-file-select="onFileSelect($files)" class="btn btn-primary btn-lg" role="button">Upload employee list</span>

Its working fine for first uplaod but when the upload fails, afterwards it does not work.

Please suggest any workaround.

Thanks in advance.

4

1 回答 1

2

我得到了这个修复。它实际上不是在错误或失败之后。上载调用更改事件。因此,当成功或错误时,您必须重置该字段。

我在成功/失败后调用了这个。现在它工作正常。

$("input#fileSelect").val("");

跨度就像

<span ng-file-select="onFileSelect($files)" class="btn btn-primary btn-lg" role="button" id="fileSelect">Upload employee list</span>
于 2014-12-11T05:54:29.090 回答