skip to Main Content

Reactjs – Issue with multer upload files

I want to upload images on the website built on React. I have issue with backend Node.js code. Code: const multer = require("multer"); // Check if the directory exists, if not, create it const directory = path.join(__dirname, "../src/assets/img/images"); if (!fs.existsSync(directory))…

VIEW QUESTION

Javascript array and variable not updating

Trying to update tatol and orders value but it isn't updating please help. let total = 0; let awaitingOrders = []; invoice.orders.map(async(order, i) =>{ await db.collection("orders") .doc(order.id).get().then(orderDoc => { total += orderDoc.data().total; awaitingOrder.push(order); } }).catch((error) => { console.log(error); }); console.log(total,…

VIEW QUESTION
Back To Top
Search