From 24aa0dc1b1dc890beea2417cb638fe6f807503e7 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 18 Dec 2021 00:19:49 -0500 Subject: [PATCH] docs: clarify in readme the value of part.filename closes #207 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd1a815..93b49a6 100644 --- a/README.md +++ b/README.md @@ -110,14 +110,14 @@ form.on('part', function(part) { // You *must* act on the part by reading it // NOTE: if you want to ignore it, just call "part.resume()" - if (!part.filename) { + if (part.filename === undefined) { // filename is not defined when this is a field and not a file console.log('got field named ' + part.name); // ignore field's content part.resume(); } - if (part.filename) { + if (part.filename !== undefined) { // filename is defined when this is a file count++; console.log('got file named ' + part.name);