router.post('/', async (req, res) => {
try {
await multipleUpload(req, res);
await coverUpload(req, res);
for(let i=0; i < req.files.length; i++){
console.log(`storage location is ${i} `, req.hostname + req.files.length);
}
return res.send({
"files ": req.files,
"file: ": req.file
});
} catch (error) {
res.status(400).send(error);
}
});