Reputation: 6167
I have a situation where I want to hide the source path or download path of a file in my server from displaying on html. However, user is still be able to download it.
Any plugin for this? It's build with Nodejs and Express.
Upvotes: 0
Views: 905
Reputation: 915
Perhaps you should create an API for it? Then you wont give away your file/folder structure.
router.get('/api/download-file', (req, res) => {
res.sendFile(your_file, {headers: {'Content-Type': 'your_file_type'}})
})
Upvotes: 2