IONIC 4- How to use a file in ng-model with MySQL and PHP

My case is the following: ON IONIC 4

My application sends data to an MSQL table, what I want is that it also sends the image to a server and inserts the name of the image to the same table. With the other data there is a type “file” can be used in the ng model?

I can not do it in a single insert (Data-name of image - upload image to the server).

My form is the following:


<form (ngSubmit)="logForm()">
        <ion-item>  
          <ion-label position="floating" color="danger" >Name:</ion-label>
          <ion-input color="primary"  type="text" [(ngModel)]="datos.nombre"></ion-input>

        </ion-item>

        <ion-item>  
          <ion-label position="floating"  color="danger">CELPHONE:</ion-label>
          <ion-input color="primary"  type="text" [(ngModel)]="datos.telefono"></ion-input>
        </ion-item>


        <ion-button expand="block" type="submit" color="danger" >SEND</ion-button>
      </form>

My ts is:

public datos: any = {};


  apiUrl='http://072atizapan.mx/index.php/'
  logForm() {

    var headers = new Headers();
    headers.append("Accept", 'application/json');
    headers.append('Content-Type', 'application/json' )
    let newData={
      funcion: 'police',
      datos: this.datos
    }
    this.http.post(this.apiUrl, JSON.stringify(newData))
    .subscribe(data=>{
      console.log(data);
      if(data==='true'){
        console.log('return');
        this.presentAlert();
        this.router.navigateByUrl('');

      }else{
        this.presentAlert();
        this.router.navigateByUrl('');

      }
    },
    (err)=>{
      this.presentAlert2();
      console.log(err);
   }
    );
  }

My php is the following:

if($_SERVER['REQUEST_METHOD'] !== 'POST'){
    echo json_encode(array('status' => false));
    exit;
       }

$postdata = file_get_contents("php://input");

$datos=json_decode($postdata, true);

switch ($datos['funcion']) {
    case 'police':
        police($datos);
        break;
    default:
        break;
}

function police($datos){

    $query="INSERT INTO `policias`(`nombre`, `telefono`,) VALUES ('{$datos['datos']['nombre']}','{$datos['datos']['telefono']}')";
    execQuery3($query);


}

The previous thing already makes insert to the table but as it would be done so that the name of the image is inserted and at the same time the image is uploaded to a folder using NG MODEL FILE but everything is done in a single insert.