File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
export default [
24
24
// ... other routes
25
25
route (" user/:id" , " pages/user-profile.tsx" , [
26
- route (" avatar" , " api/upload- avatar.tsx" ),
26
+ route (" avatar" , " api/avatar.tsx" ),
27
27
]),
28
28
] satisfies RouteConfig ;
29
29
```
@@ -115,7 +115,7 @@ Update the form's `action` to store files in the `fileStorage` instance.
115
115
116
116
``` tsx filename=pages/user-profile.tsx
117
117
import {
118
- FileUpload ,
118
+ type FileUpload ,
119
119
parseFormData ,
120
120
} from " @mjackson/form-data-parser" ;
121
121
import {
@@ -181,12 +181,12 @@ export default function UserPage({
181
181
182
182
Create a [ resource route] [ resource-route ] that streams the file as a response.
183
183
184
- ``` tsx filename=api/upload- avatar.tsx
184
+ ``` tsx filename=api/avatar.tsx
185
185
import {
186
186
fileStorage ,
187
187
getStorageKey ,
188
188
} from " ~/avatar-storage.server" ;
189
- import type { Route } from " ./+types/upload- avatar" ;
189
+ import type { Route } from " ./+types/avatar" ;
190
190
191
191
export async function loader({ params }: Route .LoaderArgs ) {
192
192
const storageKey = getStorageKey (params .id );
You can’t perform that action at this time.
0 commit comments