From 639c9516e22ad7db0af6ed274283112cc8fbfd79 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Thu, 28 Jan 2021 15:48:53 -0500 Subject: fixed indents --- .../2021-01-28-undefined-javasript-is-undefined-.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'posts') diff --git a/posts/programming/2021-01-28-undefined-javasript-is-undefined-.html b/posts/programming/2021-01-28-undefined-javasript-is-undefined-.html index 8ff3e7c..d4b8f11 100644 --- a/posts/programming/2021-01-28-undefined-javasript-is-undefined-.html +++ b/posts/programming/2021-01-28-undefined-javasript-is-undefined-.html @@ -97,7 +97,8 @@

You can see what the debugging logs looked like on the backend below. Note that the &data is the field that spells out - "undefined". + "undefined". Also note that the file picker/FormData was constructed + alright because the key for the image name is correct.

@@ -136,16 +137,17 @@ ImageWrite("The image format could not be determined")
 	  
 let file = event.target.files[0];
 if (!file) {
-return;
+	return;
 }
 
 const fd = new FormData();
 fd.append(file.name, file);
 
 const response = await fetch("http://localhost:8000/photos", {
-method: "POST",
-body: fd
+	method: "POST",
+	body: fd
 });
+
 console.log(response);
 	  
 	  
-- cgit v1.2.3