File Transfer plugin allows to upload photo or files to the remote server from the PhoneGap app.
In this tutorial, I am using Camera plugin to take a photo from camera or gallery. It will return response either in base64 format or path. You can use jQuery AJAX to upload photo in base64 format.
But it is not the better way because it works well when the image quality is low but when the image is taken from better camera device or photo quality is good then it increases the image size and takes a longer time to process, crash the app, slow down the device.
While adding File transfer plugin it will automatically download File plugin also that use to manipulate files in the device.
In the demonstration, I am creating a basic app where upload the selected photo to the server.