File upload progress checking if file send as FormData in Angular 7?
问题 I uploading file as FormData in Angular 7 with this code using HttpClient as http : sendImageFile(subUri: string, id: number, fileToUpload: File): Observable<any> { const formData: FormData = new FormData(); formData.append('file', fileToUpload, fileToUpload.name); formData.append('photoalbum_id', id.toString() ); // ... some other .append() const customHeaders = new HttpHeaders({ 'Authorization': 'Bearer' + localStorage.getItem('token'), 'Accepted-Encoding': 'application/json' }); const