I would like to create a web app that does not save an image to a user’s phone when taken, as an (admittedly imperfect) guard for IP for my workplace. I know I can set up a JavaScript capture from video stream, but if I use
<input type="file" accept="image/*" capture="camera">
It does not seem to save to my phone’s camera roll. Is it stored somewhere else on the device? Or does it actually directly upload it to the server?
2
From w3.org :
The capture attribute may be added to the input element to provide user agents with a hint of that by the default a file picker should be in media capturing mode.
This leaves it up to the implementation of the browser to decide what to do.
Under android it seems to be possible to only capture pictures and not save them.
From deprecated android Camera docs :
In order to receive data in a JPEG format, you must implement an Camera.PictureCallback interface to receive the image data and write it to a file.
So i would suggest checking your browsers capabilities and maybe even an option to modify the behavior. However i was unable to find much regarding that.
Regarding your question
Is it stored somewhere else on the device?
It again depends on the browser, it is 100% stored somewhere until you use it from your website, otherwise you would not be able to send it.
From mozilla
A file input’s value attribute contains a string that represents the path to the selected file(s).
Testing this it returned “fakepath/somefile”, this can still mean that its only stored in memory but its most likely just routing that path to the actual path on your disk.