In my XPages Mobile Controls singlePageApp I want to provide an interface for the user to upload a new photo or choose an existing photo from their photo library on their phone. I am using the following code:
<xp:fileUpload id="fileUpload1" value="#{document1.CapturedImage}" useUploadname="false"
filename="camerasnap.png" accept="image/*">
</xp:fileUpload>
The above works fine WHEN the user chooses to launch my mobile app from an icon that they added to their home screen (i.e. in standalone mode).
However, if they launch from their mobile web browser (i.e. web application mode) when they tap the fileUpload to "Choose File" they can attempt to take a picture or select an existing photo but they are always returned to the page with "no file selected" next to the [Choose File] button.
What can I do to enable the camera/photo selection for my web application mode users ... ie most users?
The solution is to put the fileUpload on a separate XPage and then source it in an iframe on the appPage.
Very eloquently presented by dominoguru Chris Toohey in blog post with accompanying video here:
http://www.dominoguru.com/page.xsp?id=xpage_fileupload_extlib_dialog_tutorial.html