I created an image downloader using angular2 http post request. Now I want to track the progress of the Downloadable image, which can be used with the xmlHTTP request, but I can not find the format suitable for it.
here is my code for the http image downloader.
uploadImage(eventId:number,formData:any): Observable<any[]> {
let headers = new Headers({ **Some necessary headers** });
let options = new RequestOptions({ headers: headers });
return this.http.post(AppSettings.API_ENDPOINT+'/events/uploads',formData, options)
.map((response: Response) => response.json());
}
It works as expected. Now, how can I track the download progress of my image?
source
share