Reading from a file using a file in node
You can read from a file and inject its content into a flow.

When using the IoT-Gateway, please also observe the manual Controllers u-control.
- Open Node-RED.
- Add a file in node from the storage category to the workspace.
- Double-click the file in node to open the Edit file in node dialogue.
- In the Filename text box, specify the path to the file you want to read from (e. g. /home/admin/user).

External storage devices are accessible at the file path /run/media/sdxn/, where x is the device letter and n is the device specific partition number (e. g. /run/media/sda1 for the first USB flash drive). If there is only one partition, n is missing.
- In the Output drop-down list, select how you want to output the file content.
- a single utf8 string: the entire content of the file is output in a single UTF8-encoded string (for text files only)
- a msg per line: each line of the file is output in a separate message (for text files only)
- a single Buffer object: the entire content of the file is output in a buffer object
- a stream of Buffers: the content of the file is split into 64-kb chunks, which are output in seperate messages
- If you want the file in node to send an error message in case of an error, enable the Send message on error (legacy mode) check box.
- Click Done to apply your changes.
- Connect the input of the file in node to the node which triggers the reading operation.
- Connect the output of the file in node to the node you want to inject the file content into.