Skip to content

Instantly share code, notes, and snippets.

@solars
Last active January 29, 2016 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solars/72b69819b5aacd91dc48 to your computer and use it in GitHub Desktop.
Save solars/72b69819b5aacd91dc48 to your computer and use it in GitHub Desktop.
Demo: http://valor-software.github.io/ng2-file-upload/ I want to display the response together with a completed item.
// this overridden method yields the response when an item completes
export class SimpleDemo {
private uploader:FileUploader = new FileUploader({url: URL});
private hasBaseDropZoneOver:boolean = false;
private hasAnotherDropZoneOver:boolean = false;
constructor() {
this.uploader.onCompleteItem = (item: any, response: any, status: any, headers: any) => {
console.log(response, responsePath);// the url will be in the response
};
}
}
// this is where the items are rendered, I have no idea how I could add the response
<tr *ngFor="#item of uploader.queue">
<item-detail [item]="item"></item-detail>
<td [id]="item?.file?.name" ><strong>{{ item?.file?.name }}</strong></td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment