Skip to content

Commit a291d3b

Browse files
authored
Rename file upload docs’ resource route file (#12778)
1 parent 36596ea commit a291d3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/how-to/file-uploads.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
export default [
2424
// ... other routes
2525
route("user/:id", "pages/user-profile.tsx", [
26-
route("avatar", "api/upload-avatar.tsx"),
26+
route("avatar", "api/avatar.tsx"),
2727
]),
2828
] satisfies RouteConfig;
2929
```
@@ -115,7 +115,7 @@ Update the form's `action` to store files in the `fileStorage` instance.
115115

116116
```tsx filename=pages/user-profile.tsx
117117
import {
118-
FileUpload,
118+
type FileUpload,
119119
parseFormData,
120120
} from "@mjackson/form-data-parser";
121121
import {
@@ -181,12 +181,12 @@ export default function UserPage({
181181

182182
Create a [resource route][resource-route] that streams the file as a response.
183183

184-
```tsx filename=api/upload-avatar.tsx
184+
```tsx filename=api/avatar.tsx
185185
import {
186186
fileStorage,
187187
getStorageKey,
188188
} from "~/avatar-storage.server";
189-
import type { Route } from "./+types/upload-avatar";
189+
import type { Route } from "./+types/avatar";
190190

191191
export async function loader({ params }: Route.LoaderArgs) {
192192
const storageKey = getStorageKey(params.id);

0 commit comments

Comments
 (0)