I'm building a web application that requires the user to upload a photo. The application is built using HTML5, CSS, JavaScript (w/jQuery), and PHP for the backend. I would like to add, besides the file uploading option, another option for users who use the application on their mobile phone - to upload a picture using the phone's camera.
From browsing a bit, I understood there are 2 approaches to this matter:
Thing is, I'm not interested in creating a separate application, and then having users install it on their phones.
I'm interested in letting a user, who chooses to use the web application on his mobile phone, the ability to take a photo using his mobile device.
How do I go about doing this?
You may take a look at the camera API which lets you either take an image from the device camera or use a stored image. Here's a description on it: https://developer.mozilla.org/en-US/docs/Web/Guide/API/Camera. It also features a demo there.