Background: iOS 6.1, at the time of writing, doesn't allow both multiple file selection and taking a photo in a single input.
Since my main app already has a multiple input picker for choosing files, I'd like to add a second button (only required by, and only shown on) iOS devices to start the camera.
This currently works with:
<input type="file" class="ios_only" accept="image/*;capture=camera">
However iOS Safari always gives the following dialog:
Is there a way the <input>
can be made to go directly to the camera without this prompt?
No, you can't. Safari handles this as an UIImagePickerView
and has to choose the source by this UIActionSheet
.
For your information, this line has the same effect:
<input type="file" class="ios_only" accept="image/*" capture="camera">
Tested also in iOS 7.
For multiple file uploads:
<input capture="camera" accept="image/*" multiple="multiple" type="file" name="photo" id="photo" value="" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With