Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

image support in node js chat app

socket.on("newPrivateMessage", function(data) {
    if (data.img) {
        var img = new Image();
        img.src = 'data:image/jpeg;base64,' + data.img;

        // Do whatever you want with your image.
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #image #support #node #js #chat #app
ADD COMMENT
Topic
Name
9+2 =