At this point:
upload = uploadpicture(finalBuffer).then((res)=>{ //success request
the res
is the result of promise uploadpicture
function (that is the parsedBody
), not the res
from the express route. So indeed, it has no status
function. Try change the then
callback name like:
upload = uploadpicture(finalBuffer).then((otherName)=>{ //success request