Search code examples
javascriptjqueryhtmlios8photos

iOS 8 Beta 5 Safari Multiple Photo Upload


We have a mobile web app that does some photo uploads using the html input tag as follows:

<input type='file' accept='image/* name='takeMult[]'/>.  

This was working in all previous builds of iOS safari (6.0 and greater). Has anyone else seen this with the Beta yet? We are wrapping it in a jquery widget and that could be the issue as there have been noted problems with jquery mobile on iOS 8 beta, but I thought they were fixed on the most recent beta. Removing it from the query widget as follows also failed:

<input type='file' multiple='multiple'>

It is no longer is allowing for multiple photo selects. The dialog box comes up and it won't let you select images. Does anyone have a workaround or heard any changes to mobile safari or photos/file input?

EDIT: I've confirmed this issue on multiple devices and the iOS 8 Beta simulator on xCode 6. I've submitted a bug report to Apple on the issue. Beta 6 was released to carriers only, so no word if it is fixed in that build. Still would like some feedback if anyone has a workaround in the off chance that Apple doesn't fix the issue.


Solution

  • The workaround is to omit the multiple attribute in the file input element. Of course, that will prevent you from selecting multiple files at once, but that's better than not being able to select any files at all.

    There is another, older bug in iOS7, also related to the multiple attribute. In that case, when this attr is set, video file upload requests will be empty (0-sized). Don't bet on this being fixed before iOS8 releases.