You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how-to/file-uploads.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,6 @@ title: File Uploads
9
9
<br/>
10
10
<br/>
11
11
12
-
Handle file uploads in your React Router applications. This guide uses some packages from the [Remix The Web][remix-the-web] project to make file uploads easier.
13
-
14
12
_Thank you to David Adams for [writing an original guide](https://programmingarehard.com/2024/09/06/remix-file-uploads-updated.html/) on which this doc is based. You can refer to it for even more examples._
15
13
16
14
## Basic File Upload
@@ -38,7 +36,7 @@ export default [
38
36
`form-data-parser` is a wrapper around `request.formData()` that provides streaming support for handling file uploads.
39
37
40
38
```shellscript
41
-
npm i @mjackson/form-data-parser
39
+
npm i @remix-run/form-data-parser
42
40
```
43
41
44
42
[See the `form-data-parser` docs for more information][form-data-parser]
@@ -57,11 +55,12 @@ You must set the form's `enctype` to `multipart/form-data` for file uploads to w
@@ -93,7 +92,7 @@ export default function Component() {
93
92
`file-storage` is a key/value interface for storing [File objects][file] in JavaScript. Similar to how `localStorage` allows you to store key/value pairs of strings in the browser, file-storage allows you to store key/value pairs of files on the server.
94
93
95
94
```shellscript
96
-
npm i @mjackson/file-storage
95
+
npm i @remix-run/file-storage
97
96
```
98
97
99
98
[See the `file-storage` docs for more information][file-storage]
@@ -103,7 +102,7 @@ npm i @mjackson/file-storage
103
102
Create a file that exports a `LocalFileStorage` instance to be used by different routes.
0 commit comments