# Reading from a file using a file in node

You can read from a file and inject its content into a flow.

1. Open Node-RED.
2. Add a file in node from the storage category to the workspace.
3. Double-click the file in node to open the Edit file in node dialogue.
4. In the text box Filename, specify the path to the file you want to read from (e. g. /home/admin/user).

5. ## NOTICE

   The memory card is accessible at the file path /run/media/mmcblk0p1/.

6. In the drop-down list Output, select how you want to output the file content.
7. a single utf8 string: the entire content of the file is output in a single UTF8-encoded string (for text files only)
8. a msg per line: each line of the file is output in a separate message (for text files only)
9. a single Buffer object: the entire content of the file is output in a buffer object
10. a stream of Buffers: the content of the file is split into 64-kb chunks, which are output in seperate messages

11. ## NOTICE

    This method of catching errors is deprecated and should only be used for legacy programs. Use catch nodes for catching errors instead.

12. If you want the file in node to send an error message in case of an error, enable the check box Send message on error (legacy mode).
13. Click Done to apply your changes.
14. Connect the input of the file in node to the node which triggers the reading operation.
15. Connect the output of the file in node to the node you want to inject the file content into.

Catching errors using a catch node