What value for send image with API


#1

I use Camera plugin for select or take image. After select application will show image in form.
My form have other input for detail.

My form.

<form #f="ngForm" (ngSubmit)="save(f)">

  *****
  other input
  *****

  <ion-item>
    <img src="assets/img/defualt.png" *ngIf="!slip">
    <img [src]="slip" *ngIf="slip">
    <input type="hidden" [(ngModel)]="slip" name="slip">
  </ion-item>

  *****
  other input
  *****

  <button ion-button type="submit" block mode="ios">Send</button>

</form>

When i try to view value with console.log in slip will be data:image/jpeg;base64, ...image_path_in_base_64.....

I want to know what data for slip, I must to use for send file above API.


#2

That totally depends on what format the upstream API is expecting to get.