Skip to content

Commit

Permalink
docs: add section on deprecation of multipart form data and file uplo…
Browse files Browse the repository at this point in the history
…ad utilities (#10338)
  • Loading branch information
brookslybrand authored Dec 16, 2024
1 parent f99377a commit 3bb9e85
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/start/future-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,19 @@ type SerializeFrom<T> = ReturnType<typeof useLoaderData<T>>;

In most cases, you should be able to just remove `SerializeFrom` and use the types returned from `useLoaderData`/`useActionData`, or the types of the data in `loader`/`action` functions.

### Multipart Form Data and File Upload utilities

The following utilities are deprecated and will be removed in React Router v7:

- `unstable_parseMultipartFormData`
- `unstable_composeUploadHandlers`
- `unstable_createFileUploadHandler`
- `unstable_createMemoryUploadHandler`

We recommend using [`@mjackson/form-data-parser`][form-data-parser] and [`@mjackson/file-storage`][file-storage] to handle multipart form data and file uploads.

You can also checkout the [React Router "File Uploads" doc][react-router-file-uploads] or ["File uploads with Remix"][file-uploads-with-remix] blog post for guides on using these libraries.

[development-strategy]: ../guides/api-development-strategy
[fetcherpersist-rfc]: https://github.com/remix-run/remix/discussions/7698
[relativesplatpath-changelog]: https://github.com/remix-run/remix/blob/main/CHANGELOG.md#futurev3_relativesplatpath
Expand Down Expand Up @@ -724,3 +737,7 @@ In most cases, you should be able to just remove `SerializeFrom` and use the typ
[data-api]: ../utils/data
[response-json]: https://developer.mozilla.org/en-US/docs/Web/API/Response/json
[remix-template-eslint-config]: https://github.com/remix-run/remix/blob/main/templates/remix/.eslintrc.cjs
[form-data-parser]: https://github.com/mjackson/remix-the-web/tree/main/packages/form-data-parser
[file-storage]: https://github.com/mjackson/remix-the-web/tree/main/packages/file-storage
[file-uploads-with-remix]: https://programmingarehard.com/2024/09/06/remix-file-uploads-updated.html/
[react-router-file-uploads]: https://reactrouter.com/how-to/file-uploads

0 comments on commit 3bb9e85

Please sign in to comment.