Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Safari Restrict Image Upload

Tags:

forms

ios

safari

I know apple provide some attribues to use in HTML to make your web app work better with Safari on iOS. I was wondering now iOS 6 supports media uploading with the file inputs, at the moment if you select it you get two options:

"Take Photo or Video"
"Choose Existing"

I was wondering if I can set the browser to only show "Take Photo or Video"? I know I've seen some fancy Safari options before I was wondering if Apple gives you this much control? Let me know if you guys have seen anything on this. I would love to remove choose existing just because of the functionality I'd like to provide.

like image 689
calabi Avatar asked Oct 28 '25 07:10

calabi


1 Answers

You can disable video so that the choice is only between:

"Take Photo"
"Choose Existing"

by adding /* to the accept attribute in your html:

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

Customizations are therefore possible, in the browser at least. I'll update if I find more.

like image 75
user1002428 Avatar answered Oct 29 '25 20:10

user1002428



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!