Closed leo6104 closed 7 years ago
I found the root cause. https://github.com/jkuri/ngx-uploader/blob/bcd90920fae5c1262eab189a51efcc6b57c3bf23/src/ngx-uploader/classes/ngx-uploader.class.ts#L216 XMLHttpRequest.DONE is not 4. it is function.
in which browser you are getting this?
It is happened in Chrome browser
this is interesting. XMLHttpRequest.DONE
represents integer of 4.
try outputing console.log(XMLHttpRequest.DONE);
.
also, I am not getting any errors because of this. if you can get me steps to reproduce it would be helpful. thanks.
I'm having the same issue - works fine with 3.2.3, breaks with 3.3.x. The component generates an UploadOutput correctly but when the event is emitted nothing happens. No errors, nothing.
The code I have is very simple:
<input ngFileSelect (uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput" class="inputfile" type="file" />
and then
onUploadOutput(output: UploadOutput): void {
if (output.type === 'addedToQueue') {
const event: UploadInput = {
type: 'uploadFile',
url: environment.urlBackend + '/file',
method: 'POST',
file: file
}
this.uploadInput.emit(event);
} else if (output.type === 'uploading') {
// update current data for uploading file
this.file = output.file;
} else if (output.type === 'done') {
(...)
}
}
Same code works with ngx-uploader 3.2.3 but not working in 3.3.1.
Our project's file upload code.
Above code follow example code.