aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ped <36962867+ped@users.noreply.github.com> 2023-09-12 17:30:06 +0200
committerGravatar GitHub <noreply@github.com> 2023-09-12 08:30:06 -0700
commitf9d2e687f53ac3d0c4b5351831808d325fba6ca6 (patch)
treed415c7fb91309021ee86bbe2b1e7480e22146855
parent31aec4ebe325982fc0ef27498984b0ad9969162b (diff)
downloadbun-f9d2e687f53ac3d0c4b5351831808d325fba6ca6.tar.gz
bun-f9d2e687f53ac3d0c4b5351831808d325fba6ca6.tar.zst
bun-f9d2e687f53ac3d0c4b5351831808d325fba6ca6.zip
Fix typo in http file upload example (#5088)
-rw-r--r--docs/guides/http/file-uploads.md2
1 files changed, 1 insertions, 1 deletions
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);