7

Which file types are applicable for upload in Mobile Safari using HTML file input?

I've already tried jpg, png, bmp, gif, tif, tiff and it works, but I'd like to have a complete list of all files.

Igor
  • 197
  • 2
  • 2
  • 7
  • I think any extension/file is valid as long as your web server allows them, also you can use "accept" attr: http://stackoverflow.com/questions/181214/file-input-accept-attribute-is-it-useful – Allende Jul 08 '15 at 14:20
  • Actually, not. Mobile Safari can access only Photo Library, that means that we can use only files, which are saved in the gallery: photos, videos and audio, but I need the list of file types. – Igor Jul 09 '15 at 07:13
  • You can look at the list of file types supported by iOS instead. Here's [the list for audio types](https://developer.apple.com/library/ios/documentation/MusicAudio/Conceptual/CoreAudioOverview/SupportedAudioFormatsMacOSX/SupportedAudioFormatsMacOSX.html). – approxiblue Jul 21 '15 at 03:20

2 Answers2

8

The developer documentation does not list any restrictions, so you're safe to assume that there aren't any:

File uploads and downloads Safari on iOS supports file uploading—that is, <input type="file"> elements—on iOS 6 and later.

Note that in iOS 6 to 8 you're basically limited to the photo library anyway, so what's in there works.

In iOS 9 there's a new file upload dialog, which apparently allows uploads from various cloud storage services which expands the scope of file uploads in mobile Safari significantly.

thomasfuchs
  • 5,386
  • 2
  • 18
  • 38
-2

Not sure if this is what you are looking for, but check this article out. It is an article about enabling mobile Safari to upload any kind of file. By default you can only upload photos and movies, which is why all of the extensions you mentioned worked.

small_data88
  • 380
  • 1
  • 10
  • This suggested answer is about installing extra stuff via a jailbreak and is most likely not what the question is about. – thomasfuchs Jul 19 '15 at 12:49
  • 1
    But it also talks about what file types are available for upload mobile Safari(that's what the jailbreak does, removes the limit), that's what the focus was, which is why I began the suggestion with, "Not sure if this is what you are looking for". – small_data88 Jul 19 '15 at 15:08