> For the complete documentation index, see [llms.txt](https://docs.frisbyjs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frisbyjs.com/api-and-usage/file-uploads-with-frisbyjs.md).

# File Uploads

Since Frisby.js is based on the Fetch API, file uploads are a cinch with the built-in FormData object (see [Using FormData Objects on MDN](https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects) if you are not familiar with them).

You can get a new FormData object from Frisby:

```
let formData = frisby.formData();
```

A full usage example might look like this:

```
const csvPath = path.resolve(__dirname, './file.csv');
let content = fs.createReadStream(csvPath);
let formData = frisby.formData();

formData.append('file', content);

return frisby
  .post('http://api.example.com/files', { body: formData })
  .inspectRequestHeaders()
  .expect('status', 200)
```
