# Assistance with image formatting, please?

**URL:** <https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809>\
**Category:** General\
**Created:** [9 September 2021 11:56 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809 "2021-09-09T11:56:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [9 September 2021 11:56 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/1 "2021-09-09T11:56:09Z")

</div>

Hey all,  
I'm using [Pushover.net](http://Pushover.net) for push notifications and it's working very well (reliable, fast and very inexpensive).  
The only thing I haven't figured out yet is how to include an image in the notification. I spoke to the developer and he sent me this below, but I have no idea how to convert an image (the output from FFMPEG IP camera RTSP frame grab (or that same image as base64)) into "multipart/form-data".

> When sending an image, the HTTP payload has to be sent with a Content-Type of multipart/form-data. Some HTTP libraries don't support this but the popular ones like curl do:
> 
> [Pushover: API](https://pushover.net/api#attachments)

Would someone be able to let me know what I might need to do to 'translate' this, please?

All the best,  
Dax.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 September 2021 12:11 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/2 "2021-09-09T12:11:59Z")

</div>

Are you using the node-red-node-pushover node ? You should be able to attach the image as a buffer as msg.attachment - use a base64 node to convert the base64 to a buffer and then a change node to move that buffer to msg.attachment.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [9 September 2021 12:17 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/3 "2021-09-09T12:17:00Z")

</div>

I'm grabbing the picture from the RSTP stream and save it to disk.  
After that it's attached to Pushover with **msg.image** with the help of a change node

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c6abf01313bd3551acfd9da5d3d6314bbd8e7394.png)

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [9 September 2021 12:39 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/4 "2021-09-09T12:39:52Z")

</div>

> Are you using the node-red-node-pushover node ?  
> Hey @dceejay, I am indeed, good sir. Thank you, I'll give that a try right now.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 November 2021 12:40 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/5 "2021-11-08T12:40:20Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [27 January 2022 17:19 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/6 "2022-01-27T17:19:48Z")

</div>



---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [27 January 2022 17:29 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/7 "2022-01-27T17:29:08Z")

</div>

Hey @edje11, thanks again for your reply. I finally managed to get everything working, but that revealed a little mistake in the solution you proposed.  
`msg.image` should actually be `msg.attachment` and once I realised that, I had everything working. (yay!)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [10 February 2022 17:29 UTC](https://discourse.nodered.org/t/assistance-with-image-formatting-please/50809/8 "2022-02-10T17:29:35Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
