title: HttpErrorResponse {headers: HttpHeaders, status: 401, statusText: "Unauthorized" - Sending Image With Post Request
body: <p>I am sending file with post request, m getting -  "Unauthorized"
         upload.component.html. and  upload.component.ts code - </p>
  
  <pre><code> &lt;input id="file-input" type="file" (change)="fileChange($event)" accept="image/*" capture="environment" /&gt;
  
  
  httpOptions = {
      headers: new HttpHeaders({
      'Content-Type':  '',
      'Authorization': localStorage.getItem('access_token')
     })
    }
  
  constructor(public http: HttpClient) {}
  results:any;
  fileChange(event) {
      const fileList: FileList = event.target.files;
      if (fileList) {
          const file = fileList[0];
  
          const formData = new FormData();
          formData.append('Policy_files', file, file.name);
          this.http.post(SERVER_URL, formData, this.httpOptions).subscribe(
            response =&gt; {
              console.log(response)
            } ,  (error) =&gt; {
              if(error){
                alert('Server Responded With An Error')
                console.log(error)
              }}
        );
  
      }
  }
  </code></pre>
  
  <p>Update - HttpErrorResponse {headers: HttpHeaders, status: 401, statusText: "Unauthorized"</p>