Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mobile Safari Multiple Upload with Camera

This is regarding iOS6's ability to handle <input type="file" />.

When you ask for a single file:

<input type="file" accept="image/*,video/*">
  • http://jsfiddle.net/CJSU6/1/
  • https://www.dropbox.com/s/d18kcin8eyypjd3/2013-03-13%2010.40.22.png

But when you ask for multiple files, the user is directly sent to the gallery

<input type="file" accept="image/*,video/*" multiple="multiple">
  • http://jsfiddle.net/CJSU6/0/
  • https://www.dropbox.com/s/b3uugzweoeqbtlc/2013-03-13%2010.39.58.png

Is there no way to access the camera if you ask for multiple files?

like image 317
Liyan Chang Avatar asked Mar 13 '13 17:03

Liyan Chang


People also ask

How do you select multiple photos on Safari?

First, tap Select in the top right of the Photos app. In addition to tapping to choose individual pictures, you can press and drag to select multiple photos at once.

How do you save multiple images on ios15?

Press and drag any one of the photos you want to save to a corner of your screen. Without releasing the finger you are dragging the photo with, tap on another photo you want to save. Keep tapping on all the photos you want to add to your gallery.

How do I take a picture with Safari?

The Only solution is to press the home button. A work around is to exit safari, load the Camera App and take the photo, go back into Safari and select the photo from the "Choose File" button in Safari. This does work.


1 Answers

iOS 9+ Update: When focusing an <input type="file" /> in iOS 9, the user is allowed to choose whether to take a picture or choose a picture from the Photo library. This functionality is consistent even when specifying the multiple attribute.
Thanks Voodoo for the heads up comment!


The reason that the camera is not available on multiselect uploads is because iOS is designed to allow "selecting multiple pictures" or "take one picture and select it".

Historically, the "Take picture" choice has always allowed the user to take a temporary picture to memory, and that single picture is provided to the application, without permitting selecting additional saved pictures. In fact, that temporary picture taken on the spot is not saved to the Camera Roll.

The only way around that when using HTML is to instruct the user to take multiple pictures ahead of time, and then upload them altogether.

You can see a similar situation in the Messages (former SMS) App, where you are given the same choices. Selecting to take a picture, will let you take one and that one is immediately placed to be sent. The fact that it is an App allows you to keep on adding by subsequently pressing the picture button. This, however, isn't the case for HTML input fields.

PS. I recall this being the case as far back as iOS 4.


As a last resort, you could create your own "simple" iOS App that allows the user to either select pictures, or take and upload simultaneously.

like image 126
Jesse Avatar answered Sep 20 '22 15:09

Jesse