TypeError: res.status is not a function

At this point:

upload = uploadpicture(finalBuffer).then((res)=>{ //success request

the resis 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

Leave a Comment