Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Download A File With Link Using ExpressJS

/*index.ejs*/
<body>
	<a href='download/'><img src='/images/downloadbutton.png'/></a>
</body>

/*indexController.js*/
exports.download = async function(req, res, next)
{ 
 
res.download("public/downloads/text.txt";
}
}
 
PREVIOUS NEXT
Tagged: #Download #A #File #With #Link #Using #ExpressJS
ADD COMMENT
Topic
Name
5+5 =