Code below is returning a Promise Object in form of Promise{object}. I am unable to get it in actual object
var msg_bo = new msgBO();
var msg = JSON.parse(req.body.message);
var cnf;
uploadFile()
function upload(){
return new Promise((resolve,reject)=>{
cnf = msg_bo.uploadMessageAttachments(msg, req.file);
resolve()
})
}
async function uploadFile(){
await upload()
console.log('my response ',cnf)
res.send({status:'success',message: {
text:msg,filename:cnf
}})
}