Hidden Gem of iOS6: File Uploads in Mobile Safari
Posted by John Maxwell on October 8, 2012 | Recent, Tech | 10 brave citizens responded! |
There’s been plenty of press coverage on the newly released iOS6, the software that powers iPhones and iPads. You may have read praise for the cool new features and screeds against iOS6 Maps. But it’s likely that you missed an important addition to iPhone’s web browser: file uploads are finally possible.
Safari Before iPhone
Apple’s development of their Safari web browser began before the release of iPhone. Though Apple watched the browser wars of the 90′s from the sidelines, the company introduced its Safari web browser for OS X in 2003. At the time, Mozilla Firefox was already popular on OS X, and many users wondered why Apple would create its own web browser when a good, third-party alternative existed. Apple built Safari, because it understood that a fast, standards-based browser is vital to any Internet-ready device, present and future.
The Internet in Your Pocket
Apple revolutionized the smartphone market with the release of iPhone in 2007. While it introduced many prodigious features, Mobile Safari was the keystone of Apple’s early, Internet-driven strategy for the iPhone. It was the first fully-functional web browser on a mobile phone. Before Mobile Safari, mobile browsers were stripped-down versions of their desktop counterparts, hamstrung by partial support for HTML, CSS, and JavaScript. Web pages that rendered normally in a desktop browser could break or render poorly in early mobile browsers. iPhone changed that by delivering a complete, palm-sized web experience.
The Original iPhone SDK
The native iPhone SDK and App Store shipped with iOS2 – a year after iPhone’s debut. If you have a good memory, you might remember that the development platform and SDK of the first-generation iPhone were, in fact, Mobile Safari and web standards. With this decision, Apple acknowledged what we already know: that web applications are easier and faster to build, launch, and maintain than their native counterparts.
File Uploads?
While Apple demonstrated that web applications running under Mobile Safari could create a compelling experience on iPhone, Mobile Safari omitted one key feature that had been a standard feature of web browsers since 1997: the ability to browse and upload files using a web form. The “Choose File” button that Safari associates with the <input type=”file”> HTML tag would appear “grayed out” and inactive in Mobile Safari.
It’s unclear why Mobile Safari didn’t support file uploads. It could be because iOS does not expose the device’s file system to the user. There is no enduser concept of files as such in iOS. The closest analogue to files are the photos created by iPhone’s camera and accessible through the photo library. It’s natural to assume that because iPhone supports attaching these photos to emails that it would also support uploading them via the web browser. But while its onboard camera, persistent Internet connection, and full-featured web browser could make the iPhone an ideal platform for photo-sharing web applications, Mobile Safari’s inability to accomodate file uploads has stymied many unsuspecting developers.
iOS Native SDK and App Store
Apple introduced the native iOS SDK and the App Store in July of 2008. While Mobile Safari remained a key feature of iPhone, Apple encouraged developers to build applications for its native platform. The native SDK promised seamless integration with iPhone hardware, faster execution, and powerful graphics libraries. Through the native SDK, iPhone applications could access the device’s camera and photo library and thereby share photos over the Internet.
It seemed obvious that Apple would extend the same photo-browsing feature to Mobile Safari, but for five iterations of iOS, Mobile Safari added no support for file uploads. One could argue that Apple kept access to the camera and photo library “native-only” in order to drive developers toward their proprietary platform and their lucrative App Store distribution model. Regardless, this surprising lack of support continued to be an annoyance for web developers. It has resulted in creative workarounds, open-source projects, a paid, third-party web browser, and many hours of unplanned iPhone development.
Fixed in iOS6!
At last, the HTML file-input works as expected in Mobile Safari. Clicking the “Choose File” button prompts users to either “Take Photo or Video” or “Choose Existing” photos or videos. The selected photo or video can then be uploaded to a web site just like a normal browser. I never envisioned being so excited by such a small, overlooked feature. But as someone who recognizes the advantages of launching products on the web, I look forward to telling our customers, “Yes, your users can upload photos from their iPhones!”

Android have had this a long time. Welcome after again Apple
@moo: now the platform that has a higher percentage of mobile web users than Android has file uploads, too!
The reason iOS omitted this feature is that there is no concept of file system from a user perspective. Although developers have access to files, users are supposed to see only apps. The apps are supposed to do the heavy lifting work to provide services and data.
Thank you for your response, Carlos. I speculated as much in the blog post, but I could never find an official word from Apple on this topic. Do you have a reference to an official response?
iOS Human Interface Guidelines, “Downplay File-Handling Operations”:
“Although iOS apps can allow people to create and manipulate files, this does not mean that people should have an awareness of a file system on an iOS-based device. There is no iOS app analogous to the OS X Finder, and people should not be asked to interact with files as they do on a computer.”
etc.
Excellent! Thank you for the reference, Not Me!
[...] URL: http://agileleague.com/2012/10/hidden-gem-of-ios6-file-uploads-in-mobile-safari/ [...]
Nice article! It will be interesting to see the echoes of this sort of limitation on OS X as the iCloud “private filesystem that isn’t really a filesystem” affects more and more apps. You may have an image type that, say, Preview.app can display, but you saved it to iCloud in Pixelmator, and so Preview won’t see it from File/Open. And Safari will be completely unaware of documents visible to both apps.
I wonder whether Apple has a brilliant but extremely slowly developing endgame in sight here, or whether they just haven’t thought it all the way through.
There’s probably a lot of mileage left in native apps for getting data from the phone to THE CLOUD, and in the ability to transfer data between cloud services. Transparently offering this along with something like Filepicker.io could be a nice solution.
I like being treated like a child by my computing devices…. so I still can’t get the documents on my PC to be loaded into the office app on the iphone. But I can move music files and photos.
It is nice to be able to upload pictures now, as I could with my android phone years ago. But it is still frustrating not to be able to upload documents and other non-image files.