docassemble
docassemble copied to clipboard
Feature Request: Provide a field to take a picture using camera
I saw a field to upload an image to the form.
I would love to see a field type to allow the user to take a picture using the camera. That would be very helpful for mobile users.
According to html spec. We only need to add the "capture" attribute to the <input ..
<input type="file" accept="image/*" capture />
I used to have this but I turned it off. I forgot exactly why it was problematic. One thing that remains is datatype: user
, which uses capture
to specify the user-facing camera.
The reality is that on mobile, datatype: file
lets the user choose the camera if they want to use the camera. So I'm not sure it makes things any more convenient for users to prevent them from uploading an image from their stored images.
Anyway, I'll look into this and try to recall why I turned off the capture feature for datatype: camera
.
After from testing with various mobile device, datatype: camera
is doing exactly what I want.
Closing this ticket.
Hello, Was there some findings on how to capture images using the camera on tablet or smartphone from within DA interview?
We are trying to have user upload camera captured image as part of the pdf document which is generated on interview completion. Also, is it possible to pass as parameter which camera - front or back - to start for uploading the image.
Can you please provide some pointer on the right way to approach this setup? I have tried to use HTML5 to capture image and add it to pdf but is there a better way to accomplish this?
See https://docassemble.org/docs/fields.html#file
datatype: camera
is just likefile
, except it limits the allowable file types to image files.
datatype: user
is just likecamera
, except with an HTML5 input type that suggests using the device’s front (user-facing) camera.
datatype: environment
is just likecamera
, except with an HTML5 input type that suggests using the device’s rear (environment-facing) camera.
Thanks for the response. Both datatype : user and environment open rear camera on android devices. Is there setting on the device needed for this to work as intended?
Will try slack for the captcha question.
Please disregard this. It works on other android devices and only one device which I tested on first, it didn't. I believe it to be settings related issue. thanks