aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);