
Hidden Gem of iOS6: File Uploads in Mobile Safari - greenagain
http://agileleague.com/2012/10/hidden-gem-of-ios6-file-uploads-in-mobile-safari/
======
hnriot
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.

~~~
r00fus
> 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.

------
ck2
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.

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

~~~
pooriaazimi
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.

~~~
mikeklaas
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.

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

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

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

------
dutchbrit
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/_">

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

~~~
larrydavid
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.

~~~
schappim
Itself under NDA...

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

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

~~~
dmorgan
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.

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

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

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

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

~~~
dutchbrit
Instagram does it so I think it should be fine.

------
carson
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.

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

~~~
dutchbrit
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...

~~~
ceejayoz
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.

------
_ajm
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.

------
tpowell
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.

------
hack_edu
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?

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

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

~~~
josteink
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.

~~~
dmorgan
> _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...

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

------
wmblaettler
It's about time!

------
monsterix
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.

