res.download("filepath");
就可以了,没那么麻烦
在返回的response中加入header
Content-Disposition:attachment; filename="policy.pdf"
Content-Type:application/octet-stream
文件名根据你的需要自己改
res.download("filepath");
就可以了,没那么麻烦
在返回的response中加入header
Content-Disposition:attachment; filename="policy.pdf"
Content-Type:application/octet-stream
文件名根据你的需要自己改