<label for="exampleFormControlSelect1">
<strong>Please Select the Number of PDFs to Merge:</strong>
</label>
<select class="form-control" id="exampleFormControlSelect1">
<option name="number">1</option>
<option name="number">2</option>
<option name="number">3</option>
<option name="number">4</option>
<option name="number">5</option>
</select>
app.post("/merge", upload.array("pdfs", 2), async (req, res, next) => {
console.log(req.files);
let d = await mergePdfs(
path.join(__dirname, req.files[0].path),
path.join(__dirname, req.files[1].path)
);
});
I have hard-coded the option for merging 2 PDFs but the user can select any number.