title: How to send Zip file in angular
body: <p>I have a form with 1 input (file type) and I want to send zip file to serve, in server i cannot get any update in my database nor any file in my storage.</p>
  
  <h1>Code</h1>
  
  <p><strong>Form</strong></p>
  
  <pre><code>&lt;form class="ion-padding" [formGroup]="distributorForm" (ngSubmit)="approveDistributor()"&gt;
        &lt;ion-row class="ion-padding"&gt;
          &lt;ion-col size="12"&gt;
            &lt;ion-input type="file" formControlName="coDoc" placeholder="Company documents"&gt;&lt;/ion-input&gt;
            &lt;small [innerHTML]="'VERIFY.tipTwo' | translate"&gt;&lt;/small&gt;
          &lt;/ion-col&gt;
  
          &lt;ion-col size="12"&gt;
              &lt;ion-button class="ion-margin-top" type="submit" expand="full" color="success" [disabled]="!distributorForm.valid"&gt;{{ 'VERIFY.send' | translate }}&lt;/ion-button&gt;
          &lt;/ion-col&gt;
        &lt;/ion-row&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public distributorForm: FormGroup;
  
  constructor(
      public formBuilder: FormBuilder,
    ) {
      this.distributorForm = this.formBuilder.group({
        coDoc: ['', Validators.required]
      });
    }
  
  approveDistributor() {
      const distributorForm = this.distributorForm.value;
      // tslint:disable-next-line: max-line-length
      this.verifyService.distributorForm(distributorForm.coDoc).subscribe(
        data =&gt; {
          this.alertService.presentToast('Sent successfully.');
        },
        error =&gt; {
          this.alertService.presentToast(error.message);
        },
        () =&gt; {
  
          this.Mainstorage.ready().then(() =&gt; {
  
            this.Mainstorage.get('token').then(
              data =&gt; {
                this.alertService.presentToast('Your data is in process after approve you\'ll be able to work with software.');
              },
              error =&gt; {
                console.log(error);
              }
            );
  
          });
  
        }
      );
    }
  </code></pre>
  
  <p><strong>Service</strong></p>
  
  <pre><code>distributorForm(
      coDoc
      ) {
        const formData = new FormData();
        formData.append('coDoc', coDoc);
        console.log(formData.get('coDoc'));
  
        const headers = new HttpHeaders({
          Authorization : this.token.token_type + ' ' + this.token.access_token,
          Accept: 'application/json, text/plain',
          'Content-Type': 'application/json'
        });
  
        return this.http.post(this.env.companyDocs,
        {
          formData
        }, { headers }
      );
  }
  </code></pre>
  
  <p><strong>Any idea?</strong></p>