How to access a mobile's camera from a anvil web app?

Hello,

Any idea about how to access mobile camera to take photos/videos using mobile browser?

Thank you!

you’ll want to take advantage of the file uploader and change the file_types property to something like…
image/*|video/*;capture=camera

I haven’t tested this… so report back how it works out…

linked post:

3 Likes

Will do, thank you for sharing this!

@stucork,

I tried it out with my phone :blush:, the file uploader itself when you click on it on the phone a small screen will show at the bottom with options (camera, video , audio or file), so there is no need to add “image/|video/;capture=camera” to the file type.

Thanks

2 Likes

great ! This is what I am looking for. Thanks

1 Like

Along similar lines, is it possible to have anvil open the phone camera to read a barcode and then take the text from that barcode into a text box??
Thank you!

@CyCy I think this is worth starting a new thread for. It’s related but not the same question and this thread already has a solution.

1 Like