TypeError:
CompanyDocs.startDownload不是函数 在Object.download [作为companydocs / download](E:\ Shiva \ pgnode \ api \ controllers \ CompanyDocsController.js:83:43 在process._tickCallback(internal / process / next_tick.js:68:7)
我正在尝试从POSMAN API服务下载文件
下载:
async function({
docId
}, exists) {
var file = await CompanyDocs.find({
docId: docId
}).limit(1)
if (!file) {
throw 'notFound';
}
//this.res.attachment(filename.downloadName);
var downloading = await CompanyDocs.startDownload(CompanyDocs.uploadedFiles);
return exists.sucess(downloading)
}