I'm using Phonegap to 1. capture a photo, 2. display the photo, 3. upload the photo. #1 and #2 are working.
For #3, I'm trying to use the FileTransfer.upload method to POST the captured photo to a Domino document (as an attachment in Rich Text?). The Phonegap API documentation explains ways to do this with PHP (sending request to a upload.php page), but I'm trying do accomplish this with an XPages/SSJS/Java solution. Was wondering if anyone has done something similar? Phonegap example is posted below. Thanks for any suggestions.
var options = new FileUploadOptions();
options.fileKey="file";
options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
options.mimeType="text/plain";
var params = new Object();
params.value1 = "test";
params.value2 = "param";
options.params = params;
var ft = new FileTransfer();
ft.upload(fileURI, "http://some.server.com/upload.php", win, fail, options);