Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable capture when upload image file (using safari on ipad)

I would like to upload a image using safari on ipad here is my html code

<input type="file" accept="image/*">

When i try to select a file, safari prompt me to choose "take photo" or "select existed file", how can i disable the "take photo" options, and just select an existing file?

I also look up w3c document, and try codes below, but not work

<input type="file" accept="image/*" capture="filesystem">
like image 343
zhenyong Avatar asked Apr 23 '14 04:04

zhenyong


1 Answers

According to this HTML5 compatibility comparator, Safari supports only partially the media capture feature: it complies with the accept attribute but ignores the catpure attribute.

So I am afraid you will have to wait for a better support from Safari before it works the way you want...

What's more, according to the W3C specifications:

When the capture attribute is specified, the user agent SHOULD invoke a file picker of the specific capture control type.

The keyword SHOULD means that Safari can choose not to follow the recommendation for some reason and still claim to be compliant with the standard...

like image 74
Djizeus Avatar answered Oct 14 '22 01:10

Djizeus