Hacker News new | past | comments | ask | show | jobs | submit login
Hidden Gem of iOS6: File Uploads in Mobile Safari (agileleague.com)
70 points by greenagain on Oct 8, 2012 | hide | past | favorite | 53 comments



I am not sure why this is being touted as a "hidden" gem, it was on the feature list and expounded as much as many of the other features in iOS6.

It is inexcusable that it wasn't previously possible to upload photos to sites (one of what is now the most common use cases for the internet) without involving a native app. The iOS ecosystem struggles to find a middle ground between native and a competitive/competent browser. This feature was no doubt strongly argued by Apple's PMs for many years, but finally they won out over some other dept's PM team.

We should at least be thankful that it wasn't introduced as a Safari-only feature.

The idea that there isn't a file system is nothing more than a suspension of disbelief, of course there's a file-system, it's just that there are folder handlers that know how to render the contents, it's actually an idea that can be traced back (possibly further to other sources also) to Microsoft's active directory notion. It morphed over the years and never became what was originally planned but iOS is very similar in how it 'hides' the underlying architecture. Camera Roll is ~/Photos + Pinterst-like dynamic grid a la Masonry.


> The idea that there isn't a file system is nothing more than a suspension of disbelief, of course there's a file-system, it's just that there are folder handlers that know how to render the contents

This is both the strength and weakness of iOS and for the most part, it's a benefit to the vast majority of it's main users (ie, not you or me). Have you looked at a non-techie's folder recently? It's a complete nightmare, and without a really good indexer and search system (OSX is ok, Windows sucks, not sure how Linux fares these days) it's nigh impossible for those users to find their saved documents - was that Tomorrow's Picnic Details.xls or did I convert it from the downloaded .csv? Maybe I only preserved it as an attachment that lives in a mail item in my inbox?

Ideas are one thing, execution is another. The fact that file uploads didn't exist forced app developers to be creative in how they managed local storage on iOS - glad the feature is there now, but I can see why Apple didn't include it originally.


>I am not sure why this is being touted as a "hidden" gem, it was on the feature list and expounded as much as many of the other features in iOS6.

Because many people don't yet know about it? As if people read the "feature lists"...

>It is inexcusable that it wasn't previously possible to upload photos to sites (one of what is now the most common use cases for the internet) without involving a native app. The iOS ecosystem struggles to find a middle ground between native and a competitive/competent browser. This feature was no doubt strongly argued by Apple's PMs for many years, but finally they won out over some other dept's PM team.

I seriously doubt this conspiracy theory. How about, they just got around to it? It also took Android a version or two to add the same feature -- and Mobile Safari has been more feature complete AND faster than the built-in Android "Browser" for years, so it's not like they tried to stifle mobile apps.

(As a matter of fact, when Jobs touted mobile apps as the way to build applications for the iPhone (pre SDK), people were frothing at the mouth, demanding a native SDK).

>Camera Roll is ~/Photos + Pinterst-like dynamic grid a la Masonry.

Nothing like Masonry, which is all about calculating and presenting images of differing heights in a non uniform grid. This here is just a grid, something ages older than Masonry and/or Pinterest.


Yup, input type=file only took them 5 or 6 years to finally implement while Android has had it since 2.0

But since ipad1 can never have ios6, you'll have to do alternative methods for any website service you operate for years to come.


The "input type=file" has been handled great on original iphone iOS using the iCab browser, and consistently since as well.

You can use that browser with any version of iOS you like. It was my go-to browser on both iPhone and iPad up until Safari in iOS 6 gained a few of iCab's features. I still use iCab on iPad, however, for the ad blocking.


Even Nintendo implemented input type=file for the 3DS.


Apple was probably concerned with the security implications of providing Safari with access to the local file system.


No, they weren't! They just wanted to force all major websites to create an iOS app as well. Now that there are 750.000+ apps in the App Store, they can give web a long-overdue break.

They still don't give websites access to camera feed (read or frontal), among other things, so you can't use a website to make a video conference.


...given that Mobile Safari has been around longer than the app store I'm not sure that's strictly true. And let's be honest, Android support for direct camera access through getUserMedia is pretty ropey at best. Neither platform is at a state where it's usable by the masses.


Yeah, the shipped the best and most performant mobile browser for years, but omitted one small feature that no-one has implemented well for nefarious purposes.


What OS/DE does not have a toolkit just for creating File Open dialogs?


Android didn't have it at first too. What other mobile OS matters?


Android implemented it years ago. My point was simply that "one small feature that no-one has implemented well" is pretty much revisionist nonsense.


>They still don't give websites access to camera feed (read or frontal), among other things, so you can't use a website to make a video conference.

And they will NOT do it until the battery, CPU power et al are there to support it running on the browser in the way a random website wants to handle it.


Does anyone know if there is a list somewhere with file input support on different Android devices? Earlier I found this issue and assumed support was sketchy: http://code.google.com/p/android/issues/detail?id=2519


It's plausible some specific carriers have locked specific models but it's also plausible some people posting in that thread were using Android 1.5 back in 2009 - note how the thread was opened in April and closed in October 2009 as "Status: Released"

But even before then there was a trick to using HTTP POST for browser uploads in Android. iPhone could never do that.


"Finally."


You can also upload multiple files:

<input type="file" multiple>

And you can also set an access type:

<input type="file" accept="video/">

<input type="file" accept="image/">


Hidden gem? It's more probable it's not disclosed because they are ashamed of public humiliation.


The were so ashamed that they decided to announce it among other new features in iOS 6 at WWDC this year. No-one pays attention to those silly conferences, especially Apple's.


Itself under NDA...


Not the keynote, and this feature was mentioned on one of Forstall's slides.


An extremely high hype and looked after feature is a hidden gem, who knew!


Can you point us to all this hype?

I didn't know about it and I watched the iOS6 presentation, skimmed through the iPhone 5, iOS 6 apple.com pages, regularly read 2-3 Apple websites + HN, and am a web developer.


Wait, so you still can't upload something a random app produced?


That's where Android Intent system shines ;)

My bet that Apple will provide something similar in the future. It's just too good. All that sharing stuff in Android, i really miss it on my iPad, it's imo the biggest feature difference between those two OS today.


I've been waiting for intents since 4.0 - I still can't believe it's not been added in 6.0.

Maybe iOS 7.0?


Apple is now using their own "intents" system (XPC Services[1]) internally in iOS 6.0, so it seems reasonable for it to arrive in a later version.

One major benefit is that Apple will be able to support JIT'd WebViews outside of Mobile Safari, without a privilege escalation.

[1] http://developer.apple.com/library/mac/#documentation/MacOSX...


Thanks! I didn't know about XPC being on iOS...

It's great news (especially in regards to Nitro-ed UIWebVIew), but still it's short of what intents are able to do. For example, I don't suppose it would be possible to "announce" to the system that I, for example, do "image editing" by getting a "png, jpg, pdf" and returning a "png, jpg, pdf". XPC would mostly be used in a single app for further sandboxing and increased security/stability.


I don't have any inside information on how Apple will do things in iOS, but I see no reason why they couldn't do that.

"Services" have been part of iOS/OS X since the late 80s/early 90s with NeXTStep, the precursor to both.

I don't think Apple is deliberately not allowing services/intents in the manner you describe, I think it's just taking them a long time to figure out how to do it within the process and security model they are trying to enforce in iOS.


Well, you can, if it's an image or a video.


... and is saved in the camera roll (not all images are there. for example a drawing app doesn't put its stupid images in your camera roll!)


Not to condone the way they've interpreted file input, but at the very very least - you can upload almost any image in the system by either saving it to camera roll, or taking a screenshot.

This is really a lowest-common-denominator for file transmission - for example, until recently my mom couldn't upload her photo on meetup.com due to this limitation (she uses only an iPad)... I figure Apple cares more about her needs than mine (saving specs.xls into a JIRA).

Any other file uploads (docs, etc) are likely better handled by an app or simply email.


Only if the app that produced it sticks it in the Camera Roll.


Can you write out files to binary-encoded images and save them to the Camera Roll? Or does that violate TOS?


Instagram does it so I think it should be fine.


Indeed, very true. I guess it's very Apple like to have a closed system.


This is great but sadly you can't resize images in the same version of mobile safari so it limits the usefulness for image uploads. There is a bug that makes large images incorrectly render to a canvas. It seems odd that this wasn't a use case they tested against.


Does anyone know why it took so long to implement such a basic feature?


I don't know, but I assume it's because they are (were?) trying to "kill" "files" as a concept users are expected to know about.


I wouldn't be surprised if they wanted to force people to create native apps instead of allowing web app file uploading via the browser. Forces extra people to buy a developer license, so more money for Apple. And not to forget, more apps in the store...


Unlikely given that iPhone 1 launched with no SDK and Jobs claiming web apps were just as good. That it wasn't in that initial OS was bizarre enough - that it persisted until iOS6 is really odd.


Just a guess, but it could be that Jobs didn't approve file uploads all this while, and now Cook and team didn't see why they shouldn't allow file uploads.


You can upload images...but rotation isn't preserved unless they're coming out of the user's Photo Stream bucket.

I think that hidden gem has a couple chips in it.


I spent 20 minutes playing with balloonduck.com at the gym the first time because I thought the ability to upload pics from mobile safari was so great. Then I went on with my life.


You can upload things, yet have nearly nothing resembling a filesystem accessible to users. How's that work? Do you just use your iCloud or Dropbox files?


You can choose to take a photo/video, or choose one from the camera roll. The standart camera roll view then opens.


Does anyone know if filepicker.io has plans to support this? Currently file uploading in mobile safari is rather underwhelming


If this isn't the ethos of everything Apple I don't know what is: other people have to support Apple. Apple just can't do anything standard or play along nicely with everyone else.

Spoiled brats we used to call them in school.


>If this isn't the ethos of everything Apple I don't know what is: other people have to support Apple. Apple just can't do anything standard or play along nicely with everyone else.

You mean like the hundreds of standards they adhere too, from POSIX (OS X is a certified UNIX OS), to all the networking standards, unicode, MIDI, OSC, VPN, ... whatever?

Or several they have released themselves for wider adoption, like the HTML5 Canvas thing, CSS transitions, Webkit, LLVM, Rendevous, etc?

Not even sure what you wrote means...


My favorite hidden gem in iOS6 is the ability to debug webapps with Safari's Web Inspector.


It's about time!


Perhaps, it's not a hidden gem but a needed pursuit which most of us waited for. I know so many developers who were forced to use third party APIs (picplz etc.) just to have normal web experience on their application.

Anyway, this is good news for the web. Hope the browsers on tablets go beyond their 'mobile' paradigm and there is increase both in horsepower and adoption of web standards.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: