Fail to re-add same file after remove it from queue #1144
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fail to re-add same file after remove it from queue
Solution:
Please support clear input file value after remove file from queue.
@nankingcigar Just set empty value after request
@ViewChild('fileInput', null) fileInput: ElementRef;
<input id="file_loader" type="file" ng2FileSelect [uploader]="uploader" (change)="fileDropped($event.target.files);" #fileInput style="display: none;" />
uploadFile = () => {
this.fileService
.createFileDocument()
.pipe(retry(100))
.subscribe(
data =>
{this.fileInput.nativeElement.value = '';
},
error => {
this.fileInput.nativeElement.value = '';
}
);
}