Upload widget in mobile client

3
I need to rebuild an existing iphone native app with Mendix. With the Mendix 4.0 release that's no problem, but I need to upload an image from the mobile client, but there is no upload widget available in the mobile forms. When can we expect an upload widget for the mobile forms or is there another way to achieve this?
asked
4 answers
2

Here is one way you could solve the upload issue for mobile browsers:

  • Implement the MxSMTP module for receiving mail in your Mendix application.
  • In your mobile web app, create an Upload button. When the user clicks the Upload button, generate a unique mail address and tell the user to mail the attachment to that address. Store this unique email address for future reference by the the MxSMTP module's processing microflows.
  • When the user mails to the unique address, have the attachment(s) of the email processed by the MxSMTP module and stored in your application in the correct spot in your domain model. To prevent the system from receiving multiple emails/attachments on the email address, you can decide to lock/remove the address and have the MxSMTP module automatically ignore any other emails sent to that unique address.

The mobile web version of Facebook and TwitPic use this design pattern too.

answered
1

As far as I know, there is not yet an HTML5 way of doing this.

The solution is to wrap your project in a native app using Apache Cordova (formerly known as PhoneGap). This wrapper exposes native functionality as a Javascript API. A custom widget can then upload photos from the camera or camera roll.

A tutorial about using Cordova is being written and will appear soon!

Update: here is the link to the tutorial already!

Native Mobile functionality with Apache Cordova

answered
1

Hint: http://www.matlus.com/html5-file-upload-with-progress/

answered
1

I thought it would be possible but in short it is currently not possible for the iphone.

Stack overflow pointed out the following though, IOS 6 is said to support photo upload to websites. Then again since the beta has only been released like yesterday this might take a while.

If you still would like to have an android version of the file upload see the following video: http://www.youtube.com/watch?v=4f2Zky_YyyQ

Also you should have a look at this site on a android mobile device.

According to the video the following tags are allowed:

<input type="file"accept="image/*;capture=camera">

<input type="file"accept="audio/*;capture=microphone">

<input type="file"accept="video/*;capture=camcorder">

<input x-webkit-speech>
answered