However, when I pass this to the Pushover node, the image doesn't show up in the message.
Has anyone successfully sent a base64-encoded image with the Pushover node? Do I need to include any additional metadata (like filename or content-type), or is just passing the Buffer enough?
Any advice or working example would be greatly appreciated!
What I’m trying to do is embed the image directly into the Pushover message so that it shows up inline in the notification — not just as an attachment.
From what I found, setting msg.image is indeed the way to do that. However, in my case, it only works when the image is provided as a buffer, not as an HTTPS URL. When I try to set msg.image to an HTTPS link (e.g. from my camera), it doesn't display in the message — at least not for me.
But I’m not sure if this is the right approach — or if something else is required for the Pushover node to embed the image properly.
You can't set it as a link - how could your end device (eg phone) browse to your camera to access that link ? (I hope it couldn't anyway). You need to get the image locally (eg using http request node - then send the buffer to pushover.
But don't you receive a buffer from the http request node ? Now you are converting it to base64 and then back to a buffer in the function node (?) - ie. what @dceejay is suggesting, just send the buffer directly from the http req node (set it to output a buffer) as msg.image
When I fetch the image using an HTTP Request node, I receive a buffer (1055996 bytes). I process this for email by converting it to base64 and embedding it into the email, which is then sent using an Email node — and the image displays correctly in the email.
Now, after the HTTP Request node, I’ve added a Move node that transfers the content of msg.payload into either msg.image or msg.attachment, depending on the test. However, in both cases the image is not delivered via Pushover anymore.
If I use msg.image, I get the error: TypeError: msg.image.match is not a function, and the Pushover message is not sent.
If I use msg.attachment, the Pushover message is sent, but without an image.
What can I do to make the image work with Pushover?