Downloading and uploading files through Safari iOS

Solution 1:

Actually the iOS does have a filesystem, and each app gets access to a sandboxed portion of the file system.

The iOS "system" itself has several programs that do access the filesystem directly, but mobile safari acts more like a restricted app purchased from iTunes than say springboard or the app store app itself.

Uploads are basically impossible in iOS. Mobile Safari doesn't read from the address book (which most sandboxed apps can and will do by default). It also doesn't use the photo picker to upload pictures or video.

Downloads are possible, but often require a helper app to store and use the download. Safari handles mp3, streams, and other media itself and lets you listen or watch the "download". You can't save it in the way a computer allows, but the web server thinks a download happened and safari actually downloads the file to it's cache (where it stays until the cache fills and it ages out and gets deleted). All other file types are handled as the iOS uses UTI file detectors to see which apps installed can handle a potential download. (The developer document I linked to has several paragraphs readable by anyone, but it dives into developer minutia very quickly so feel free to bail on that link before the simple idea behind UTI gets confused)

If safari detects another app has registered for a download, you will see an "open in apptastic" to indicate that mobile safari will download that file but hand it off to another app to store in that app's sandbox.

Safari uses a system API call to have the iOS do the writing across sandboxes.


Since you asked about a zip file, all you need on your iPad is to find an app that tells iOS it can handle zip files, and as long as the sourceforge servers send enough data for mobile safari to detect a zip file, you can download it over to your app. The reverse trip is harder, your ZIP app can't really push a file to safari for upload. Your app has to be programmed to log into sourceforge directly and call the upload API itself. (which technically will probably use the mobile safari code / webkit to do a http upload - but that all happens behind the scenes, not in what we see and control as mobile safari with the blue compass icon)

Solution 2:

Mobile Safari itself cannot store files for you (without jailbreaking). However some Apps like Dropbox register with Safari and enable limited support for some filetypes.

File inputs are just disabled/greyed out on Mobile Safari.