1

I have a JSON response back from my url for my uploads but in code I can't get it, can you suggest where and how I can get it?

onUploadOutput(output: UploadOutput): void {

if (output.type === 'allAddedToQueue') {
  const event: UploadInput = {
    type: 'uploadAll',
    url: this.url,
    method: 'POST',
    data: {foo: 'bar'}
  };

  this.uploadInput.emit(event);

........

} else if (output.type === 'done') {
  this.files.forEach(file => {
    console.log('ciao'); //DIDN'T WORK
    console.log(file.response); //DIDN'T WORK
    this.uploadInput.emit(file.response);
  });
}

this.files = this.files.filter(file => file.progress.status !== UploadStatus.Done);

  }
}

1 Answers1

0

Found a solution, edit ngx-uploader module and change this code about line 236 in ngx-uploader.js:


    xhr.onreadystatechange = () => {
    if (xhr.readyState === 4) {
    /** @type {?} */