# File Upload Features

**URL:** https://discourse.nodered.org/t/file-upload-features/9233
**Category:** General
**Created:** [20 March 2019 15:14 UTC](https://discourse.nodered.org/t/file-upload-features/9233 "2019-03-20T15:14:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nhar](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nhar](https://discourse.nodered.org/u/nhar)
#### Post date: [20 March 2019 15:14 UTC](https://discourse.nodered.org/t/file-upload-features/9233/1 "2019-03-20T15:14:17Z")

</div>

I'm trying to build an application which will allow a user to upload a text file through a basic web form and be able to read the text file to take its contents as a string. Is this possible? I currently have a system set up which sends the text file to a particular URL and gets the file info from this URL, but I'm unsure how to access the text data itself.

My debug node outputs [this](https://prnt.sc/n0jlpc) which is correct, but like I said I'm not sure how to access that actual file data itself. The node map looks like [this](https://prnt.sc/n0jqrh). The function node is just a test node that sets the payload to OK and returns it at the moment.

Does anybody know how to go about doing this? Thanks

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [20 March 2019 15:18 UTC](https://discourse.nodered.org/t/file-upload-features/9233/2 "2019-03-20T15:18:35Z")

</div>

Hi @nhar

in the Debug node output the contents of file can be seen under the 'buffer' property.

So in your flow, you can access the contents as `msg.req.files[0].buffer`.

You can use a Function node to convert the buffer to a String using:

```auto
msg.payload = msg.req.files[0].buffer.toString();
return msg;

```

---

<div class="post-metadata">

### Author: ![nhar](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nhar](https://discourse.nodered.org/u/nhar)
#### Post date: [20 March 2019 15:44 UTC](https://discourse.nodered.org/t/file-upload-features/9233/3 "2019-03-20T15:44:43Z")

</div>

> [@knolleary](#):
>
> msg.payload = msg.req.files[0].buffer.toString(); return msg;

that was it, thank you so much!
