diff options
Diffstat (limited to 'docs/guides/http/file-uploads.md')
-rw-r--r-- | docs/guides/http/file-uploads.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/guides/http/file-uploads.md b/docs/guides/http/file-uploads.md index 7cc0e742a..ce23b5d0c 100644 --- a/docs/guides/http/file-uploads.md +++ b/docs/guides/http/file-uploads.md @@ -59,7 +59,7 @@ Listening on http://localhost:4000 Our form will send a `POST` request to the `/action` endpoint with the form data. Let's handle that request in our server. -First we use the [`.formData()`](https://developer.mozilla.org/en-US/docs/Web/API/Request/formData) method on the incoming `Request` to asynchonously parse its contents to a `FormData` instance. Then we can use the [`.get()`](https://developer.mozilla.org/en-US/docs/Web/API/FormData/get) method to extract the value of the `name` and `profilePicture` fields. Here `name` corresponds to a `string` and `profilePicture` is a `Blob`. +First we use the [`.formData()`](https://developer.mozilla.org/en-US/docs/Web/API/Request/formData) method on the incoming `Request` to asynchronously parse its contents to a `FormData` instance. Then we can use the [`.get()`](https://developer.mozilla.org/en-US/docs/Web/API/FormData/get) method to extract the value of the `name` and `profilePicture` fields. Here `name` corresponds to a `string` and `profilePicture` is a `Blob`. Finally, we write the `Blob` to disk using [`Bun.write()`](/docs/api/file-io#writing-files-bun-write). |