Making an iOS file input go directly to the camera app?

后端 未结 2 1447
深忆病人
深忆病人 2021-02-13 20:27

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 i

相关标签:
2条回答
  • 2021-02-13 20:49

    For multiple file uploads:

    <input capture="camera" accept="image/*" multiple="multiple" type="file" name="photo" id="photo" value="" />
    
    0 讨论(0)
  • 2021-02-13 20:51

    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.

    0 讨论(0)
提交回复
热议问题