# What kind of best way to send a image file to Node-RED

**URL:** <https://discourse.nodered.org/t/what-kind-of-best-way-to-send-a-image-file-to-node-red/29280>\
**Category:** General\
**Created:** [1 July 2020 05:21 UTC](https://discourse.nodered.org/t/what-kind-of-best-way-to-send-a-image-file-to-node-red/29280 "2020-07-01T05:21:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timon](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@Timon](https://discourse.nodered.org/u/Timon)\
**Post date:** [1 July 2020 05:21 UTC](https://discourse.nodered.org/t/what-kind-of-best-way-to-send-a-image-file-to-node-red/29280/1 "2020-07-01T05:21:11Z")

</div>

Hello there,

I want to save a image file from device to DB with Node-RED.  
So i create flows as below inside Node-RED.

1. create node 'http in'
2. create node 'template'
3. create node 'debug'

I am wondering how do i pick each value up from received form data.  
I want to pick filename, form-data up.

```auto
[{"id":"da61568.38e3ea8","type":"template","z":"4fa5208f.bd0e1","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"msg.req.headers : {{msg.req.files}}\nmsg.headers : {{msg.headers}}\nFile Name : {{msg.req.headers.filename}}\nDATA_KEY : {{payload.filename}}\n ************************* \n{{payload}}","output":"str","x":260,"y":300,"wires":[["d720d871.e20d08","5c5f2347.23f1bc"]]}]

```

[received data]

```auto
-----------------------------8d81dc92a6984d2
Content-Disposition: form-data; name&#x3D;&quot;uploadFile0&quot;; filename&#x3D;&quot;log.jpg&quot;
Content-Type: multipart&#x2F;form-data

����JFIF��C
aa

��C		

��&#x2F;&#x2F;&quot;��a	��1a!1A&quot;Qa�2q#%������!1A�&quot;��?���y��y���UQ_�!�3�ug��I��L}�)����,�v�$FR��s�o��ۈ�V��1d�ɔ�H𢠸����&gt;����-��%�b�o3.)�)m�h���e�
��k�~&quot;��M:�(Т*$�-,a��+�F�ϻoƩ�mU�G�+��΍�r+�_���\V�7���]��lpC�D���uډЄ߈�&amp;M���F�����̫��%
�?w*%@��Ҧ7�E�i �V�2 �o�m��������h�1x��&#x2F;&#x2F;�.)��eS#)�����)��I���5{�56[iۥ�?,�а�Q#n� vף�K�1ډ�rS��FT��;��@j����#:z���Mj�D�a1���߷6�m&#39;J5C�...

```

---

<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:** [1 July 2020 07:44 UTC](https://discourse.nodered.org/t/what-kind-of-best-way-to-send-a-image-file-to-node-red/29280/2 "2020-07-01T07:44:23Z")

</div>

maybe have a look at this flow ? [https://flows.nodered.org/flow/215e3f0ac615ef8a644dbc7aa72b2af9](https://flows.nodered.org/flow/215e3f0ac615ef8a644dbc7aa72b2af9)

---

<div class="post-metadata">

**Author:** ![Timon](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@Timon](https://discourse.nodered.org/u/Timon)\
**Post date:** [9 July 2020 00:23 UTC](https://discourse.nodered.org/t/what-kind-of-best-way-to-send-a-image-file-to-node-red/29280/3 "2020-07-09T00:23:05Z")

</div>

Thank you 🙂

---

<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:** [7 September 2020 00:23 UTC](https://discourse.nodered.org/t/what-kind-of-best-way-to-send-a-image-file-to-node-red/29280/4 "2020-09-07T00:23:14Z")

</div>

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