The app needs to allow users to upload a picture in the Product Evaluation page, WAP end quickly changed, but the app side encountered some problems: the app all forms are Ajax submissions can not submit images, the page has the same requirements and WAP, so refer to the previous app-side image upload function, decided to use two interfaces to complete each;
The text portion of the form is submitted first, as before, after the successful submission of the interface to modify the ID value of the successful submission, and then check whether the user has added a picture, if you add a picture, upload a picture (using the app's image upload plugin) and get the ID to another receive image interface, The interface updates the picture information to the corresponding record based on the ID value.
Note: Do not use the input:file tag in the app, use the usual tag plus onclick event, open the picture library using Ueximage.openpicker plugin, select the image will get the URL of the image, upload the need for this URL;
Uploading images using plugins uexuploadermgr
Upload a picture of a simulated form in the app