1# With Multipart File Upload
2
3<p>
4 <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-multipart">
5 <img
6 alt="Open in StackBlitz"
7 src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
8 />
9 </a>
10 <a
11 href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-multipart">
12 <img
13 alt="Open in CodeSandbox"
14 src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
15 />
16 </a>
17</p>
18
19This example shows `urql` in use with `@urql/exchange-multipart-fetch`'s `multipartFetchExchange`
20to support file uploads in GraphQL. This largely follows the ["File Uploads" docs
21page](https://formidable.com/open-source/urql/docs/advanced/persistence-and-uploads/)
22and uses the [`trygql.formidable.dev/graphql/uploads-mock` schema](https://github.com/FormidableLabs/trygql).
23
24To run this example install dependencies and run the `start` script:
25
26```sh
27yarn install
28yarn run start
29# or
30npm install
31npm run start
32```
33
34This example contains:
35
36- The `urql` bindings and a React app with a client set up in [`src/App.jsx`](src/App.jsx)
37- A basic file upload form in [`src/FileUpload.jsx`](src/FileUpload.jsx)