Here’s a question for you: Suppose your company needs a mobile app that lets users upload photos from their current location. Does this job require the more difficult native approach, or will a simpler mobile web app meet your needs?
If you read the “6 ‘native’ features you can use with mobile web apps” article, you already know the answer. While file uploading sounds like a native-only feature, it’s actually very simple with mobile web apps. Today, I’m going to show you how.
Basics
Uploading files from a mobile web app isn’t complicated. Most mobile browsers support the “input type=”file”” HTML tag, which lets users import files. However, there is one minor complication: The iOS Safari browser does not support this tag. Thankfully, there are other options for iOS users. For instance, the “iCab” browser (found in the App Store) lets users upload files. Also, the Picup iPhone app does the same thing. For even more options, here’s a great article to check out.
Tutorial and demo
Of course, uploading files from a mobile web app requires more than the input tag. First you need a database and a mobile web app that can write to that database. If you’d like to learn more, we’ve written up a short tutorial about building mobile web apps that can upload files, which even includes a demo that you can try with your smartphone.
Remember, mobile web applications are more powerful than most people realize. Before assuming that your company needs native apps, check first to see if mobile web apps can meet your needs.
IOS 6 now supports the file input HTML tag, video here:
http://www.youtube.com/watch?v=6l9WP5hUtIA
(IOS 6 – AJAX Asynchronous File Upload, WebApp, Safari iPhone 3GS)