Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

As already known, it's not possible for iOS users to select image files to upload from Safari on iPhone, because the browse button to display the "select file"- dialog is disabled. It works fine on Android, but not on iPhone...

What is the particular reason for that issue? I heard that the browse button is disabled because there isn't a file browser on the iPhone. Someone other said that Safari just disabled root access. Is there any reliable source which explains the issue? (I need it for my thesis.)

share|improve this question

migrated from superuser.com Jun 4 '12 at 9:51

This question came from our site for computer enthusiasts and power users.

2  
You can't access the file system under iOS, an upload function doesn't make sense. –  patrix Jun 4 '12 at 12:37
    
Okay, so the access is denied? Or does iOS not work with a file system? –  Kirinriki Jun 4 '12 at 15:20
    
@patrix it does make sense: apps have it, so why can't safari get photo upload? besides, ios6 got support for that anyways. :) –  user37621 Jan 7 '13 at 19:32
    
Photos are special (there is an access API for them), for the rest see Mark's answer below. –  patrix Jan 7 '13 at 19:46

3 Answers 3

up vote 4 down vote accepted

iOS apps can only read data in their own directory and thus only Safari would be able to use these files - so how could you create them and put them in Safari's directories?

From Apple's Filesystem basics development documentation

An iOS app’s interactions with the file system are limited mostly to the directories inside the app’s sandbox. During installation of a new app, the installer code creates a home directory for the app, places the app in that directory, and creates several other key directories. These directories constitute the app’s primary view of the file system. Figure 1-1 shows a representation of the sandbox for an app.

Figure 1-1 Each iOS app operates within its own sandbox

Because it is in a sandbox, an app is generally prohibited from accessing or creating files in directories outside of its home directory. One exception to this rule occurs when an app uses public system interfaces to access things such as the user’s contacts or music. In those cases, the system frameworks handle any file-related operations needed to read from or modify the appropriate data store

share|improve this answer
    
thanks alot! That's what I searched for. –  Kirinriki Jun 4 '12 at 19:25
2  
I'd like to add that starting with iOS 6, Mobile Safari will allow file inputs for uploading photos and videos from your Photo Library. –  Gerry Jun 12 '12 at 7:14

From all of my research I cannot find a descriptive answers as to why this feature has been disabled in mobile safari. I don't know if you are interested but if you have your iOS device jailbroken there is a tweak called "Safari Upload Enabler" which gives mobile safari the ability to upload files. You can buy it on cydia for $1.99

share|improve this answer
    
Thanks for your answer. Also thanks for the link, I'll have a look. I asked because I'm performing usability engineering in my thesis and wanted to explain why I have to make the website into a native app. –  Kirinriki Jun 4 '12 at 15:10
    
Basically unlocking removes some security and so apps have access to the whole file system. –  Mark Jun 4 '12 at 15:14

iOS 6 fixed this problem by granting one exception to the sand boxing of apps from each-other's data. Upload buttons may now ask about taking/browsing for a picture or video clip to upload.

Other than by exception, there still is no full filesystem access on iOS 6 and lower.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.