node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

node-red-node-pushover support for attachment_base64 and attachment_type

Open freman opened this issue 1 year ago • 1 comments

Hey, so, node-red-node-pushover has been working brilliantly but I've had a change of workflow that includes sending the images that I was previously attaching as base64. I tried a couple of different ways of passing it to the node before I went poking around the source and I don't think it supports it.

Could we please have support for attachment_base64 and attachment_type (https://pushover.net/api#attachments-base64)?

freman avatar May 14 '24 07:05 freman

The Pushover node supports buffers in msg.attachment, so you can provide a base64 encoded image like this if you have it in a string:

msg.attachment = Buffer.from(msg.payload.picture, 'base64')
return msg

Put this into a function node before the pushover node and you should be golden.

kerwitz avatar Aug 07 '24 08:08 kerwitz