I want to make a web app where you can send images in real-time. is there any way of doing it?? any video link or documentation link will be very helpful.
Thank You
As the official website says, socket.io can handle blob objects.
Starting in 1.0, it's possible to send any blob back and forth: image, audio, video.
For example, you can push documents from socket.io server-side like the following. Pushing from client-side to server-side is almost the same with this.
Server-side
const filePath = "./img.jpg" const imgBinary = fs.readFileSync(filePath) socket.emit("img",imgBinary) Client-side
socket.on("img", imgBinary => { const blob = new Blob([imgBinary]) const imgBlobUrl = window.URL.createObjectURL(blob) // Insert imgBlobUrl into img.src or something });