I'm building a mobile app for Android with JQM and PhoneGap. I need to upload a file (image) to remote server (from galery or take a picture with camera). Basically it can be done using phonegap file API, the problem is that the server was written to support simple POST submission.
What I need is to "simulate" in my app request exact as it would sent from the following html form. In addition I need to get the server response.
<form name="myWebForm" ENCTYPE="multipart/form-data" action="http://www.myurl.com/api/uploadImage "method="post">
<input type="file" name="image" />
<input type="submit" value="Submit"/>
</form>
I tried to use phonegap file API but the structure of the retrieved data on the server side is different than it should be.
I tried to implement that form in my app but the "choose file" button was disabled...
How it can be achieved without making any changes on the server side?