Uploading base64 images to srver through rest(php) api

I want to upload 12 images with couple of form data from my app to my server through a rest php api. Can anyone provide me a sample code on how to do that. I cannot figure it out on how to send both images and form data together.

This is exactly why I wrote this tutorial: http://roblouie.com/article/574/learn-ionic-cordova-file-upload/

Includes full example code for both the ionic app and the image upload server.

If you’re doing a form submit though you almost certainly don’t want a base64 image.