From 455638634c9bbc9322c8975b4aa7d3af2a0c6ee4 Mon Sep 17 00:00:00 2001 From: Icebob Date: Sun, 8 Oct 2023 15:25:08 +0200 Subject: [PATCH] add formidable file upload example --- examples/formidable/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/formidable/index.js b/examples/formidable/index.js index df40c7bf..ea7e1f09 100644 --- a/examples/formidable/index.js +++ b/examples/formidable/index.js @@ -80,8 +80,7 @@ broker.createService({ methods: { handleFileUpload(req, res) { // parse a file upload - const form = new formidable.IncomingForm(); - form.multiples = true; + const form = formidable({ multiples: true }); form.parse(req, async (err, fields, files) => { if (err) {