# Serving a file in nodered to share with external nodes - what kinds of "http" blocks do I need?

**URL:** https://discourse.nodered.org/t/serving-a-file-in-nodered-to-share-with-external-nodes-what-kinds-of-http-blocks-do-i-need/66976
**Category:** Dashboard
**Tags:** http-request
**Created:** [26 August 2022 14:43 UTC](https://discourse.nodered.org/t/serving-a-file-in-nodered-to-share-with-external-nodes-what-kinds-of-http-blocks-do-i-need/66976 "2022-08-26T14:43:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rt54321](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@rt54321](https://discourse.nodered.org/u/rt54321)
#### Post date: [26 August 2022 14:43 UTC](https://discourse.nodered.org/t/serving-a-file-in-nodered-to-share-with-external-nodes-what-kinds-of-http-blocks-do-i-need/66976/1 "2022-08-26T14:43:11Z")

</div>

Greetings!

Setup: I have nodered running on an rpi (rpi's IP address is 192.168.0.113), with several ESP32 nodes on the network as well. They all communicate over MQTT, but they can use other methods (like UDP or TCP) as well. This is a local home network.

Problem: I want nodered on the rpi to "serve" a firmware file  
[example: [http://192.168.0.113/firmware/fw\_ver9.bin](http://192.168.0.113/firmware/fw_ver9.bin)]

1. Let's assume that the ESP32 is currently using fw\_ver8.bin firmware
2. The ESP32 node first "checks" to see if fw\_ver9.bin exists using some kind of http command, pointed at "192.168.0.113/firmware/fw\_ver9.bin".
3. If the fw\_ver9.bin file DOES exist, then download it.

I'm not sure what nodered nodes I need (some kind of http "get" or "post" requests?) - is there a similar example of what I want to do above?

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [26 August 2022 15:01 UTC](https://discourse.nodered.org/t/serving-a-file-in-nodered-to-share-with-external-nodes-what-kinds-of-http-blocks-do-i-need/66976/2 "2022-08-26T15:01:21Z")

</div>

> [@rt54321](#):
>
> I want nodered on the rpi to "serve" a firmware file

Hello .. you can do this by creating a folder that contains your firmware.  
For Example `/home/pi/firmware"` and then editing your `settings.js`  
(should be located in `/home/pi/.node-red/settings.js`)  
edit the line for Node-red to serve that folder `httpStatic = "/home/pi/firmware"`

Your files should be accessible from  
Example ` http://192.168.0.113:1880/fw_ver9.bin`

ps. adding the port 1880 or whatever port your Node-RED is running on is important

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 August 2022 15:13 UTC](https://discourse.nodered.org/t/serving-a-file-in-nodered-to-share-with-external-nodes-what-kinds-of-http-blocks-do-i-need/66976/3 "2022-08-26T15:13:46Z")

</div>

or with standard node-red nodes...

[https://flows.nodered.org/flow/db68bd4934cf46f39e6e453a348bc419](https://flows.nodered.org/flow/db68bd4934cf46f39e6e453a348bc419)

---

<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: [25 September 2022 15:13 UTC](https://discourse.nodered.org/t/serving-a-file-in-nodered-to-share-with-external-nodes-what-kinds-of-http-blocks-do-i-need/66976/4 "2022-09-25T15:13:56Z")

</div>

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