3 ms·
I just tried this. I went to http://fiddle.jshell.net/wut6z/show/ http://fiddle.jshell.net/wut6z/show/ (which is the HTML frame of a fiddle someone posted down
by dean 14y ago
I just tried this. I went to http://fiddle.jshell.net/wut6z/show/ http://fiddle.jshell.net/wut6z/show/ (which is the HTML frame of a fiddle someone posted down this page), with my iPhone. It's just an HTML input tag with type=file and an "accept" attribute set to "image/*", and it shows up as a "Choose File" button in the browser.
When you tap it, a sheet slides up from the bottom of the screen with buttons for "Take Photo", "Choose Existing" and "Cancel". Tapping "Take Photo", opens the rear-facing camera, and I have to tap to take the picture.
"Choose Existing" opens the photo album. It works like a normal file chooser if your hardware doesn't support a camera.
So, on this page, I had control over taking the picture. But you raise good points, and I'm curious what you could do with JavaScript if you were trying to take pictures without the user's knowledge.
I'm also curious what metadata I just uploaded.