> For the complete documentation index, see [llms.txt](https://skyslit.gitbook.io/magicjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyslit.gitbook.io/magicjs/api-references/backend/utils/readfilefromuseruploads.md).

# readFileFromUserUploads()

This function is used to save a file from the user to the folder named user-uploads.

> Example:

```tsx
import { createBackendFunction, utils } from '@magicjs.dev/backend';

export default createBackendFunction(async function (fileName: string) {
  return utils.readFileFromUserUploads('/', fileName);
});
```

> An example of the usage is given in the [createSrc()](https://skyslit.gitbook.io/magicjs/api-references/backend/utils/pages/J7D2kBGegKCAcT4S1Ymr#backend-get-file.server) section.

[Click here to refer GitHub.](https://github.com/skyslit/magicjs.dev/blob/main/packages/backend/src/utils.ts#L32)
