From f9d2e687f53ac3d0c4b5351831808d325fba6ca6 Mon Sep 17 00:00:00 2001 From: ped <36962867+ped@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:30:06 +0200 Subject: Fix typo in http file upload example (#5088) --- docs/guides/http/file-uploads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/http/file-uploads.md b/docs/guides/http/file-uploads.md index a708a238a..7cc0e742a 100644 --- a/docs/guides/http/file-uploads.md +++ b/docs/guides/http/file-uploads.md @@ -81,7 +81,7 @@ const server = Bun.serve({ + if (url.pathname === '/action') { + const formdata = await req.formData(); + const name = formdata.get('name'); -+ const profilePicture = formdata.get('profilePicture');+ ++ const profilePicture = formdata.get('profilePicture'); + if (!profilePicture) throw new Error('Must upload a profile picture.'); + // write profilePicture to disk + await Bun.write('profilePicture.png', profilePicture); -- cgit v1.2.3