Hi all,
I'm using an HTML code through mustache template node, as below:
The Idea is to get a "true" and complete buffer output in the first "1-string buffer" debug node, as in the second debug node "2-Buffer".
The problem is that the template node "image" outputs only text of the code itself, and not the smiley image as in the HTTP out: "http://127.0.0.1:1880/myimage"
Here's the flow:
[{"id":"474e4db9.c11e94","type":"http in","z":"8561fce.5cad2","name":"","url":"/myimage","method":"get","upload":false,"swaggerDoc":"","x":120,"y":980,"wires":[["737221c3.4437b"]]},{"id":"737221c3.4437b","type":"template","z":"8561fce.5cad2","name":"image","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<!DOCTYPE html>\n<html>\n<body>\n\n<img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/220px-SNice.svg.png\" alt=\"Smiley face\" width=\"42\" height=\"42\">\n\n</body>\n</html>\n","output":"str","x":290,"y":960,"wires":[["d92586c.c839478","20e0cbad.f8b604"]]},{"id":"d92586c.c839478","type":"http response","z":"8561fce.5cad2","name":"","statusCode":"","headers":{},"x":430,"y":920,"wires":[]},{"id":"f412297d.781dc8","type":"debug","z":"8561fce.5cad2","name":"1-String-Buffer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":600,"y":980,"wires":[]},{"id":"20e0cbad.f8b604","type":"http request","z":"8561fce.5cad2","name":"Post","method":"POST","ret":"bin","paytoqs":false,"url":"http://localhost:1880/myimage","tls":"","persist":false,"proxy":"","authType":"","x":430,"y":980,"wires":[["f412297d.781dc8"]]},{"id":"557afc7e.efcdd4","type":"http request","z":"8561fce.5cad2","name":"GET","method":"GET","ret":"bin","paytoqs":false,"url":"https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/220px-SNice.svg.png","tls":"","persist":false,"proxy":"","authType":"","x":290,"y":1060,"wires":[["71f86078.01758"]]},{"id":"71f86078.01758","type":"debug","z":"8561fce.5cad2","name":"2-Buffer","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":480,"y":1060,"wires":[]},{"id":"aa00b974.31ada8","type":"inject","z":"8561fce.5cad2","name":"Inject","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":1060,"wires":[["557afc7e.efcdd4"]]},{"id":"4987c6b8.bf43d8","type":"inject","z":"8561fce.5cad2","name":"Inject","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":920,"wires":[["737221c3.4437b"]]}]
It seems simple, but I'm struggling with it for hours.
Any comment and idea is highly appreciated. Thanks!
.