I'm building a mobile website and I'd like to use the Camera API to take photos. The images should be displayed on the website and uploaded to a server. According to the introduction to the Camera API on MDN the images can be accessed and displayed on the website using FileReader
or window.URL.createObjectURL
. I tested these possible solutions successfully with an iPad (Safari and Chrome) and an Android tablet (Chrome and Firefox).
What is the difference between FileReader
and window.URL.createObjectURL
? I think window.URL.createObjectURL
is newer but not a standard yet. Is there a difference in the performance?